mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
docs(react): update component usage docs (#17615)
This commit is contained in:
@ -74,6 +74,39 @@ backdrop.stopPropagation = false;
|
||||
```
|
||||
|
||||
|
||||
### React
|
||||
|
||||
```tsx
|
||||
import React from 'react';
|
||||
|
||||
import { IonBackdrop } from '@ionic/react';
|
||||
|
||||
const Example: React.SFC<{}> = () => (
|
||||
<>
|
||||
{/*-- Default backdrop --*/}
|
||||
<IonBackdrop />
|
||||
|
||||
{/*-- Backdrop that is not tappable --*/}
|
||||
<IonBackdrop tappable={false} />
|
||||
|
||||
{/*-- Backdrop that is not visible --*/}
|
||||
<IonBackdrop visible={false} />
|
||||
|
||||
{/*-- Backdrop with propagation --*/}
|
||||
<IonBackdrop stopPropagation={false} />
|
||||
|
||||
<IonBackdrop
|
||||
tappable={true}
|
||||
visible={true}
|
||||
stopPropagation={true}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
export default Example;
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
29
core/src/components/backdrop/usage/react.md
Normal file
29
core/src/components/backdrop/usage/react.md
Normal file
@ -0,0 +1,29 @@
|
||||
```tsx
|
||||
import React from 'react';
|
||||
|
||||
import { IonBackdrop } from '@ionic/react';
|
||||
|
||||
const Example: React.SFC<{}> = () => (
|
||||
<>
|
||||
{/*-- Default backdrop --*/}
|
||||
<IonBackdrop />
|
||||
|
||||
{/*-- Backdrop that is not tappable --*/}
|
||||
<IonBackdrop tappable={false} />
|
||||
|
||||
{/*-- Backdrop that is not visible --*/}
|
||||
<IonBackdrop visible={false} />
|
||||
|
||||
{/*-- Backdrop with propagation --*/}
|
||||
<IonBackdrop stopPropagation={false} />
|
||||
|
||||
<IonBackdrop
|
||||
tappable={true}
|
||||
visible={true}
|
||||
stopPropagation={true}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
export default Example;
|
||||
```
|
||||
Reference in New Issue
Block a user