-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into upgrade/react-native/0.71.6-hermes
- Loading branch information
Showing
7 changed files
with
101 additions
and
6 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
...ponents/BottomSheets/BottomSheetOverlay/BottomSheetOverlay/BottomSheetOverlay.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,26 @@ | ||
/* eslint-disable no-console, react-native/no-inline-styles */ | ||
|
||
// Third party dependencies. | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react-native'; | ||
|
||
// External dependencies. | ||
import { getOverlayStoryProps } from '../../../Overlay/Overlay.stories'; | ||
|
||
// Internal dependencies. | ||
import BottomSheetOverlay from './BottomSheetOverlay'; | ||
import { BottomSheetOverlayProps } from './BottomSheetOverlay.types'; | ||
|
||
export const getBottomSheetOverlayStoryProps = (): BottomSheetOverlayProps => | ||
getOverlayStoryProps(); | ||
|
||
const BottomSheetOverlayStory = () => ( | ||
<BottomSheetOverlay {...getBottomSheetOverlayStoryProps()} /> | ||
); | ||
|
||
storiesOf('Component Library / BottomSheets', module).add( | ||
'BottomSheetOverlay', | ||
BottomSheetOverlayStory, | ||
); | ||
|
||
export default BottomSheetOverlayStory; |
16 changes: 16 additions & 0 deletions
16
...rary/components/BottomSheets/BottomSheetOverlay/BottomSheetOverlay/BottomSheetOverlay.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,16 @@ | ||
/* eslint-disable react/prop-types */ | ||
|
||
// Third party dependencies. | ||
import React from 'react'; | ||
|
||
// External dependencies. | ||
import Overlay from '../../../../components/Overlay/Overlay'; | ||
|
||
// Internal dependencies. | ||
import { BottomSheetOverlayProps } from './BottomSheetOverlay.types'; | ||
|
||
const BottomSheetOverlay: React.FC<BottomSheetOverlayProps> = ({ | ||
...props | ||
}) => <Overlay {...props} />; | ||
|
||
export default BottomSheetOverlay; |
7 changes: 7 additions & 0 deletions
7
...components/BottomSheets/BottomSheetOverlay/BottomSheetOverlay/BottomSheetOverlay.types.ts
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,7 @@ | ||
// External dependencies. | ||
import { OverlayProps } from '../../../Overlay/Overlay.types'; | ||
|
||
/** | ||
* BottomSheetOverlay component props. | ||
*/ | ||
export type BottomSheetOverlayProps = OverlayProps; |
29 changes: 29 additions & 0 deletions
29
...library/components/BottomSheets/BottomSheetOverlay/BottomSheetOverlay/README.md
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,29 @@ | ||
# BottomSheetOverlay | ||
|
||
BottomSheetOverlay is a semi-transparent layer that is placed on top of the page content to provide focus on the content placed above the BottomSheet and prevent interaction with the underlying content. | ||
|
||
## Props | ||
|
||
This component extends [OverlayProp](../../../Overlay/Overlay.types.ts) component. | ||
|
||
### `color` | ||
|
||
Optional prop to configure the color of the BottomSheetOverlay. | ||
|
||
| <span style="color:gray;font-size:14px">TYPE</span> | <span style="color:gray;font-size:14px">REQUIRED</span> | | ||
| :-------------------------------------------------- | :------------------------------------------------------ | | ||
| ColorValue | No | | ||
|
||
### `onPress` | ||
|
||
Function to trigger when pressing the BottomSheetOverlay. | ||
|
||
| <span style="color:gray;font-size:14px">TYPE</span> | <span style="color:gray;font-size:14px">REQUIRED</span> | | ||
| :-------------------------------------------------- | :------------------------------------------------------ | | ||
| Function | No | | ||
|
||
## Usage | ||
|
||
```javascript | ||
<BottomSheetOverlay onPress={() => {}}/>; | ||
``` |
1 change: 1 addition & 0 deletions
1
app/component-library/components/BottomSheets/BottomSheetOverlay/BottomSheetOverlay/index.ts
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 @@ | ||
export { default } from './BottomSheetOverlay'; |
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