From 5ccd1dbac131815b3f40992a7ff91869f151e020 Mon Sep 17 00:00:00 2001 From: Hyo Date: Mon, 11 Jan 2021 01:41:29 +0900 Subject: [PATCH] [Button] bugfixes in 0.0.28 release (#372) The patch did not apply correctly in #371. Fixes in current `PR`. --- CHANGELOGS.md | 4 ++-- lib/package.json | 2 +- main/Button.tsx | 23 ++++++++++++++--------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/CHANGELOGS.md b/CHANGELOGS.md index ae17d7abd..8c9ee2438 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,8 +1,8 @@ ## Changelogs -## 0.0.28 +## 0.0.29 -- Added `TouchableOpacity` style prop to [Button] [#37`](https://github.com/dooboolab/dooboo-ui/pull/371`). +- Added `TouchableOpacity` style prop to [Button] [#372](https://github.com/dooboolab/dooboo-ui/pull/372). ## 0.0.27 diff --git a/lib/package.json b/lib/package.json index d3cd3ef9f..52a0a335c 100644 --- a/lib/package.json +++ b/lib/package.json @@ -1,6 +1,6 @@ { "name": "dooboo-ui", - "version": "0.0.28", + "version": "0.0.29", "main": "index.js", "types": "index.d.ts", "author": "dooboolab", diff --git a/main/Button.tsx b/main/Button.tsx index 97f90855f..954dbe6a6 100644 --- a/main/Button.tsx +++ b/main/Button.tsx @@ -72,7 +72,8 @@ function Button({ testID, disabled, loading, - styles: style, + style, + styles, indicatorColor = '#ffffff', leftElement, rightElement, @@ -94,33 +95,37 @@ function Button({ onPress={onPress} delayPressIn={50} disabled={disabled} - style={[ - isHovered && !disabled && [defaultStyles.hovered, style?.hovered], - disabled && [defaultStyles.disabledButton, style?.disabledButton], - ]} + style={style} {...touchableOpacityProps}> {loading ? ( ) : ( setLayout(e.nativeEvent.layout)}> {leftElement} {text}