mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 15:51:16 +08:00
docs(react): update component usage docs (#17615)
This commit is contained in:
@ -26,6 +26,32 @@ Thumbnails can be used by themselves or inside of any element. If placed inside
|
||||
```
|
||||
|
||||
|
||||
### React
|
||||
|
||||
```tsx
|
||||
import React from 'react';
|
||||
|
||||
import { IonThumbnail, IonItem, IonLabel } from '@ionic/react';
|
||||
|
||||
const Example: React.SFC<{}> = () => (
|
||||
<>
|
||||
<IonThumbnail>
|
||||
<img src="https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" />
|
||||
</IonThumbnail>
|
||||
|
||||
<IonItem>
|
||||
<IonThumbnail slot="start">
|
||||
<img src="https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" />
|
||||
</IonThumbnail>
|
||||
<IonLabel>Item Thumbnail</IonLabel>
|
||||
</IonItem>
|
||||
</>
|
||||
);
|
||||
|
||||
export default Example;
|
||||
```
|
||||
|
||||
|
||||
|
||||
## CSS Custom Properties
|
||||
|
||||
|
||||
22
core/src/components/thumbnail/usage/react.md
Normal file
22
core/src/components/thumbnail/usage/react.md
Normal file
@ -0,0 +1,22 @@
|
||||
```tsx
|
||||
import React from 'react';
|
||||
|
||||
import { IonThumbnail, IonItem, IonLabel } from '@ionic/react';
|
||||
|
||||
const Example: React.SFC<{}> = () => (
|
||||
<>
|
||||
<IonThumbnail>
|
||||
<img src="https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" />
|
||||
</IonThumbnail>
|
||||
|
||||
<IonItem>
|
||||
<IonThumbnail slot="start">
|
||||
<img src="https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" />
|
||||
</IonThumbnail>
|
||||
<IonLabel>Item Thumbnail</IonLabel>
|
||||
</IonItem>
|
||||
</>
|
||||
);
|
||||
|
||||
export default Example;
|
||||
```
|
||||
Reference in New Issue
Block a user