diff --git a/apps/wallet-mobile/.storybook/storybook.requires.js b/apps/wallet-mobile/.storybook/storybook.requires.js index 746352407c..f1fc7e7b43 100644 --- a/apps/wallet-mobile/.storybook/storybook.requires.js +++ b/apps/wallet-mobile/.storybook/storybook.requires.js @@ -69,6 +69,7 @@ const getStories = () => { "./src/components/AmountItem/AmountItem.stories.tsx": require("../src/components/AmountItem/AmountItem.stories.tsx"), "./src/components/Analytics/Analytics.stories.tsx": require("../src/components/Analytics/Analytics.stories.tsx"), "./src/components/BlueCheckbox/BlueCheckbox.stories.tsx": require("../src/components/BlueCheckbox/BlueCheckbox.stories.tsx"), + "./src/components/BottomSheet/BottomSheet.stories.tsx": require("../src/components/BottomSheet/BottomSheet.stories.tsx"), "./src/components/BottomSheetModal/BottomSheetModal.stories.tsx": require("../src/components/BottomSheetModal/BottomSheetModal.stories.tsx"), "./src/components/Boundary/Boundary.stories.tsx": require("../src/components/Boundary/Boundary.stories.tsx"), "./src/components/Button/Button.stories.tsx": require("../src/components/Button/Button.stories.tsx"), diff --git a/apps/wallet-mobile/src/components/BottomSheet/BottomSheet.stories.tsx b/apps/wallet-mobile/src/components/BottomSheet/BottomSheet.stories.tsx new file mode 100644 index 0000000000..e285acda3f --- /dev/null +++ b/apps/wallet-mobile/src/components/BottomSheet/BottomSheet.stories.tsx @@ -0,0 +1,114 @@ +import {storiesOf} from '@storybook/react-native' +import React from 'react' +import {Button, ScrollView, StyleSheet, Text, TextInput, View} from 'react-native' + +import {Spacer} from '../Spacer' +import {BottomSheet, BottomSheetRef} from './BottomSheet' + +storiesOf('BottomSheet', module) + .add('Default', () => ) + .add('Scroll + input (Keyboard) + extendable', () => ) + +const ComponentDefault = () => { + const bottomSheetRef = React.useRef(null) + + const openBottomSheet = () => { + bottomSheetRef.current?.openBottomSheet() + } + + const closeBottomSheet = () => { + bottomSheetRef.current?.closeBottomSheet() + } + + const handleClick = () => { + if (bottomSheetRef.current?.isOpen) closeBottomSheet() + else openBottomSheet() + } + + return ( + +