mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
docs(react): update component usage docs (#17615)
This commit is contained in:
@ -36,6 +36,43 @@ Notes are text elements generally used as subtitles that provide more informatio
|
||||
```
|
||||
|
||||
|
||||
### React
|
||||
|
||||
```tsx
|
||||
import React from 'react';
|
||||
|
||||
import { IonNote, IonList, IonItem, IonLabel } from '@ionic/react';
|
||||
|
||||
const Example: React.SFC<{}> = () => (
|
||||
<>
|
||||
{/*-- Default Note --*/}
|
||||
<IonNote>Default Note</IonNote>
|
||||
|
||||
{/*-- Note Colors --*/}
|
||||
<IonNote color="primary">Primary Note</IonNote>
|
||||
<IonNote color="secondary">Secondary Note</IonNote>
|
||||
<IonNote color="danger">Danger Note</IonNote>
|
||||
<IonNote color="light">Light Note</IonNote>
|
||||
<IonNote color="dark">Dark Note</IonNote>
|
||||
|
||||
{/*-- Notes in a List --*/}
|
||||
<IonList>
|
||||
<IonItem>
|
||||
<IonLabel>Note (End)</IonLabel>
|
||||
<IonNote slot="end">On</IonNote>
|
||||
</IonItem>
|
||||
|
||||
<IonItem>
|
||||
<IonNote slot="start">Off</IonNote>
|
||||
<IonLabel>Note (Start)</IonLabel>
|
||||
</IonItem>
|
||||
</IonList>
|
||||
</>
|
||||
);
|
||||
|
||||
export default Example
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
33
core/src/components/note/usage/react.md
Normal file
33
core/src/components/note/usage/react.md
Normal file
@ -0,0 +1,33 @@
|
||||
```tsx
|
||||
import React from 'react';
|
||||
|
||||
import { IonNote, IonList, IonItem, IonLabel } from '@ionic/react';
|
||||
|
||||
const Example: React.SFC<{}> = () => (
|
||||
<>
|
||||
{/*-- Default Note --*/}
|
||||
<IonNote>Default Note</IonNote>
|
||||
|
||||
{/*-- Note Colors --*/}
|
||||
<IonNote color="primary">Primary Note</IonNote>
|
||||
<IonNote color="secondary">Secondary Note</IonNote>
|
||||
<IonNote color="danger">Danger Note</IonNote>
|
||||
<IonNote color="light">Light Note</IonNote>
|
||||
<IonNote color="dark">Dark Note</IonNote>
|
||||
|
||||
{/*-- Notes in a List --*/}
|
||||
<IonList>
|
||||
<IonItem>
|
||||
<IonLabel>Note (End)</IonLabel>
|
||||
<IonNote slot="end">On</IonNote>
|
||||
</IonItem>
|
||||
|
||||
<IonItem>
|
||||
<IonNote slot="start">Off</IonNote>
|
||||
<IonLabel>Note (Start)</IonLabel>
|
||||
</IonItem>
|
||||
</IonList>
|
||||
</>
|
||||
);
|
||||
|
||||
export default Example
|
||||
Reference in New Issue
Block a user