11---
22title : " ion-thumbnail"
3- hide_table_of_contents : true
4- demoUrl : " /docs/demos/api/thumbnail/index.html"
5- demoSourceUrl : " https://github.com/ionic-team/ionic-docs/tree/main/static/demos/api/thumbnail/index.html"
63---
7- import Tabs from '@theme/Tabs ';
8- import TabItem from '@theme/TabItem ';
94
105import Props from '@site/static /auto-generated/thumbnail/props.md';
116import Events from '@site/static /auto-generated/thumbnail/events.md';
@@ -20,153 +15,30 @@ import Slots from '@site/static/auto-generated/thumbnail/slots.md';
2015</head >
2116
2217import EncapsulationPill from '@components/page /api/EncapsulationPill';
23- import APITOCInline from '@components/page /api/APITOCInline';
2418
2519<EncapsulationPill type =" shadow " />
2620
27- <h2 className =" table-of-contents__title " >Contents</h2 >
28-
29- <APITOCInline
30- toc={toc}
31- maxHeadingLevel={2}
32- autogenerated={[ Props, Events, Methods, Parts, CustomProps, Slots] }
33- />
34-
35-
36-
3721Thumbnails are square components that usually wrap an image or icon. They can be used to make it easier to display a group of larger images or provide a preview of the full-size image.
3822
3923Thumbnails can be used by themselves or inside of any element. If placed inside of an ` ion-item ` , the thumbnail will resize to fit the parent component. To position a thumbnail on the left or right side of an item, set the slot to ` start ` or ` end ` , respectively.
4024
25+ ## Basic
4126
27+ import Basic from '@site/static /usage/thumbnail/basic/index.md';
4228
29+ <Basic />
4330
44- ## Usage
45-
46- <Tabs groupId="framework" defaultValue="angular" values={[ { value: 'angular', label: 'Angular' }, { value: 'javascript', label: 'Javascript' }, { value: 'react', label: 'React' }, { value: 'stencil', label: 'Stencil' }, { value: 'vue', label: 'Vue' }] }>
47-
48- <TabItem value =" angular " >
49-
50- ``` html
51- <ion-thumbnail >
52- <img src =" https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" >
53- </ion-thumbnail >
54-
55- <ion-item >
56- <ion-thumbnail slot =" start" >
57- <img src =" https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" >
58- </ion-thumbnail >
59- <ion-label >Item Thumbnail</ion-label >
60- </ion-item >
61- ```
62-
63- </TabItem >
64-
65-
66- <TabItem value =" javascript " >
67-
68- ``` html
69- <ion-thumbnail >
70- <img src =" https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" >
71- </ion-thumbnail >
72-
73- <ion-item >
74- <ion-thumbnail slot =" start" >
75- <img src =" https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" >
76- </ion-thumbnail >
77- <ion-label >Item Thumbnail</ion-label >
78- </ion-item >
79- ```
80-
81- </TabItem >
82-
83-
84- <TabItem value =" react " >
85-
86- ``` tsx
87- import React from ' react' ;
88- import { IonThumbnail , IonItem , IonLabel , IonContent } from ' @ionic/react' ;
89-
90- export const ThumbnailExample: React .FC = () => (
91- <IonContent >
92- <IonThumbnail >
93- <img src = " https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" />
94- </IonThumbnail >
95-
96- <IonItem >
97- <IonThumbnail slot = " start" >
98- <img src = " https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" />
99- </IonThumbnail >
100- <IonLabel >Item Thumbnail</IonLabel >
101- </IonItem >
102- </IonContent >
103- );
104- ```
105-
106-
107- </TabItem >
108-
109-
110- <TabItem value =" stencil " >
111-
112- ``` tsx
113- import { Component , h } from ' @stencil/core' ;
114-
115- @Component ({
116- tag: ' thumbnail-example' ,
117- styleUrl: ' thumbnail-example.css'
118- })
119- export class ThumbnailExample {
120- render() {
121- return [
122- <ion-thumbnail >
123- <img src = " https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" />
124- </ion-thumbnail >,
125-
126- <ion-item >
127- <ion-thumbnail slot = " start" >
128- <img src = " https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" />
129- </ion-thumbnail >
130- <ion-label >Item Thumbnail</ion-label >
131- </ion-item >
132- ];
133- }
134- }
135- ```
136-
137-
138- </TabItem >
139-
140-
141- <TabItem value =" vue " >
142-
143- ``` html
144- <template >
145- <ion-thumbnail >
146- <img src =" https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" >
147- </ion-thumbnail >
31+ ## Item Thumbnails
14832
149- <ion-item >
150- <ion-thumbnail slot =" start" >
151- <img src =" https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" >
152- </ion-thumbnail >
153- <ion-label >Item Thumbnail</ion-label >
154- </ion-item >
155- </template >
33+ import Item from '@site/static /usage/thumbnail/item/index.md';
15634
157- <script >
158- import { IonItem , IonLabel , IonThumbnail } from ' @ionic/vue' ;
159- import { defineComponent } from ' vue' ;
35+ <Item />
16036
161- export default defineComponent ({
162- components: { IonItem, IonLabel, IonThumbnail }
163- });
164- </script >
165- ```
37+ ## Theming
16638
167- </ TabItem >
39+ import Theming from ' @ site/static /usage/thumbnail/theming/index.md';
16840
169- </ Tabs >
41+ <Theming / >
17042
17143## Properties
17244<Props />
@@ -184,4 +56,4 @@ export default defineComponent({
18456<CustomProps />
18557
18658## Slots
187- <Slots />
59+ <Slots />
0 commit comments