-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2224 from gluestack/feat/added-gorhom-bottom-sheet
feat: added gorhom bottom sheet
- Loading branch information
Showing
9 changed files
with
2,016 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
example/storybook-nativewind/src/components/BottomSheet/BottomSheet.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { ComponentMeta } from '@storybook/react-native'; | ||
import BottomSheet from './BottomSheet'; | ||
|
||
const BottomSheetMeta: ComponentMeta<typeof BottomSheet> = { | ||
title: 'stories/BottomSheet', | ||
component: BottomSheet, | ||
argTypes: {}, | ||
}; | ||
|
||
export default BottomSheetMeta; | ||
|
||
export { BottomSheet }; |
50 changes: 50 additions & 0 deletions
50
example/storybook-nativewind/src/components/BottomSheet/BottomSheet.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React from 'react'; | ||
import { | ||
BottomSheet, | ||
BottomSheetBackdrop, | ||
BottomSheetContent, | ||
BottomSheetDragIndicator, | ||
BottomSheetItem, | ||
BottomSheetItemText, | ||
BottomSheetPortal, | ||
BottomSheetTrigger, | ||
} from '@/components/ui/bottomsheet'; | ||
import { Text } from '@/components/ui/text'; | ||
|
||
const BottomSheetBasic = ({ | ||
text = 'Open Action Sheet', | ||
_colorMode, | ||
...props | ||
}: any) => { | ||
return ( | ||
<BottomSheet {...props}> | ||
<BottomSheetTrigger> | ||
<Text>{text}</Text> | ||
</BottomSheetTrigger> | ||
<BottomSheetPortal | ||
snapPoints={['25%', '50%']} | ||
backdropComponent={BottomSheetBackdrop} | ||
handleComponent={BottomSheetDragIndicator} | ||
> | ||
<BottomSheetContent> | ||
<BottomSheetItem> | ||
<BottomSheetItemText>Item 1</BottomSheetItemText> | ||
</BottomSheetItem> | ||
<BottomSheetItem> | ||
<BottomSheetItemText>Item 2</BottomSheetItemText> | ||
</BottomSheetItem> | ||
<BottomSheetItem> | ||
<BottomSheetItemText>Item 3</BottomSheetItemText> | ||
</BottomSheetItem> | ||
</BottomSheetContent> | ||
</BottomSheetPortal> | ||
</BottomSheet> | ||
); | ||
}; | ||
|
||
BottomSheetBasic.description = | ||
'This is a basic BottomSheet component example. The BottomSheet component lets you quickly and easily add status indicators to your interface for improved usability. They are designed to be attention-grabbing and quickly convey important information.'; | ||
|
||
export default BottomSheetBasic; | ||
|
||
export { BottomSheet }; |
Oops, something went wrong.