Skip to content
This repository was archived by the owner on May 31, 2021. It is now read-only.

Commit

Permalink
Patch/button (#371)
Browse files Browse the repository at this point in the history
Altough there are more `styles` to decorate inside the `TouchableOpacity`, we did not have the `style` of its own component. Here is where you should place styles like margin.

Bump ver to `0.0.28`.
  • Loading branch information
hyochan authored Jan 10, 2021
1 parent a4c7a8c commit 7689582
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOGS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelogs

## 0.0.28

- Added `TouchableOpacity` style prop to [Button] [#37`](https://github.com/dooboolab/dooboo-ui/pull/371`).

## 0.0.27

- Updated packages and applied new linting rules [#370](https://github.com/dooboolab/dooboo-ui/pull/370).
Expand Down
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dooboo-ui",
"version": "0.0.27",
"version": "0.0.28",
"main": "index.js",
"types": "index.d.ts",
"author": "dooboolab",
Expand Down
3 changes: 3 additions & 0 deletions main/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import {
ActivityIndicator,
LayoutRectangle,
StyleProp,
StyleSheet,
Text,
TextProps,
TouchableOpacity,
TouchableOpacityProps,
View,
ViewStyle,
} from 'react-native';
import React, { useRef, useState } from 'react';

Expand Down Expand Up @@ -55,6 +57,7 @@ interface Props {
indicatorColor?: string;
loading?: boolean;
disabled?: boolean;
style?: StyleProp<ViewStyle>;
styles?: StylesType;
leftElement?: React.ReactElement;
rightElement?: React.ReactElement;
Expand Down
6 changes: 3 additions & 3 deletions stories/dooboo-ui/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ function Default(): React.ReactElement {
loading={false}
text="😀 😎 👍 💯"
onPress={action('Clicked')}
style={{ marginVertical: 40 }}
styles={{
container: {
marginVertical: 40,
borderWidth: 0.5,
},
}}
Expand All @@ -57,9 +57,9 @@ function Default(): React.ReactElement {
/>

<Button
style={{ marginVertical: 40 }}
styles={{
container: {
marginVertical: 40,
borderWidth: 0.5,
},
text: {
Expand All @@ -81,9 +81,9 @@ function Default(): React.ReactElement {
}
loading={googleLoading}
indicatorColor="#023059"
style={{ marginVertical: 20 }}
styles={{
container: {
marginVertical: 20,
backgroundColor: '#ccc',
},
}}
Expand Down

0 comments on commit 7689582

Please sign in to comment.