Skip to content

Commit

Permalink
Updating button story to styled button
Browse files Browse the repository at this point in the history
  • Loading branch information
georgewrmarshall committed Jan 12, 2022
1 parent f4f8fae commit 0632dc3
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 18 deletions.
14 changes: 0 additions & 14 deletions app/components/UI/Button/Button.stories.js

This file was deleted.

39 changes: 39 additions & 0 deletions app/components/UI/StyledButton/StyledButton.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from 'react';
import { action } from '@storybook/addon-actions';
import { text, boolean, select } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/react-native';
import StyledButton from '.';

storiesOf('UI / StyledButton', module)
.addDecorator((getStory) => getStory())
.add('Default', () => (
<StyledButton
type={select(
'type',
{
orange: 'orange',
blue: 'blue',
confirm: 'confirm',
normal: 'normal',
'rounded-normal': 'rounded-normal',
cancel: 'cancel',
signingCancel: 'signingCancel',
transparent: 'transparent',
'transparent-blue': 'transparent-blue',
warning: 'warning',
'warning-empty': 'warning-empty',
info: 'info',
neutral: 'neutral',
danger: 'danger',
sign: 'sign',
view: 'view',
},
'confirm'
)}
onPress={action('onPress')}
disabled={boolean('disabled', false)}
onPressOut={action('onPressOut')}
>
{text('children', 'Confirm')}
</StyledButton>
));
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ SPEC CHECKSUMS:
Branch: 6a281514287f99d707615ac62c2cca69e0213df0
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
DoubleConversion: cde416483dac037923206447da6e1454df403714
FBLazyVector: 3bb422f41b18121b71783a905c10e58606f7dc3e
FBReactNativeSpec: f2c97f2529dd79c083355182cc158c9f98f4bd6e
Flipper: 1bd2db48dcc31e4b167b9a33ec1df01c2ded4893
Expand All @@ -683,7 +683,7 @@ SPEC CHECKSUMS:
Flipper-RSocket: 127954abe8b162fcaf68d2134d34dc2bd7076154
FlipperKit: 651f50a42eb95c01b3e89a60996dd6aded529eeb
Folly: b73c3869541e86821df3c387eb0af5f65addfab4
glog: 5337263514dd6f09803962437687240c5dc39aa4
glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
lottie-ios: a50d5c0160425cd4b01b852bb9578963e6d92d31
lottie-react-native: 7ca15c46249b61e3f9ffcf114cb4123e907a2156
Expand Down
4 changes: 2 additions & 2 deletions storybook/storyLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ function loadStories() {
require('../app/components/Base/Alert.stories');
require('../app/components/Base/Text.stories');
require('../app/components/Base/Title.stories');
require('../app/components/UI/Button/Button.stories');
require('../app/components/UI/Fox/Fox.stories');
require('../app/components/UI/StyledButton/StyledButton.stories');
}

const stories = [
'../app/components/Base/Alert.stories',
'../app/components/Base/Text.stories',
'../app/components/Base/Title.stories',
'../app/components/UI/Button/Button.stories',
'../app/components/UI/Fox/Fox.stories',
'../app/components/UI/StyledButton/StyledButton.stories',
];

module.exports = {
Expand Down

0 comments on commit 0632dc3

Please sign in to comment.