mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
docs(react): updating icon usages
This commit is contained in:
@ -178,28 +178,30 @@ will match the following tab:
|
||||
```tsx
|
||||
import React from 'react';
|
||||
import { IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel, IonBadge } from '@ionic/react';
|
||||
import { calendar, personCircle, map, informationCircle } from 'ionicons/icons';
|
||||
|
||||
|
||||
export const TabsExample: React.FC = () => (
|
||||
<IonTabs>
|
||||
<IonTabBar slot="bottom">
|
||||
<IonTabButton tab="schedule">
|
||||
<IonIcon name="calendar" />
|
||||
<IonIcon icon={calendar} />
|
||||
<IonLabel>Schedule</IonLabel>
|
||||
<IonBadge>6</IonBadge>
|
||||
</IonTabButton>
|
||||
|
||||
<IonTabButton tab="speakers">
|
||||
<IonIcon name="person-circle" />
|
||||
<IonIcon icon={personCircle} />
|
||||
<IonLabel>Speakers</IonLabel>
|
||||
</IonTabButton>
|
||||
|
||||
<IonTabButton tab="map">
|
||||
<IonIcon name="map" />
|
||||
<IonIcon icon={map} />
|
||||
<IonLabel>Map</IonLabel>
|
||||
</IonTabButton>
|
||||
|
||||
<IonTabButton tab="about">
|
||||
<IonIcon name="information-circle" />
|
||||
<IonIcon icon={informationCircle} />
|
||||
<IonLabel>About</IonLabel>
|
||||
</IonTabButton>
|
||||
</IonTabBar>
|
||||
|
||||
@ -1,28 +1,30 @@
|
||||
```tsx
|
||||
import React from 'react';
|
||||
import { IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel, IonBadge } from '@ionic/react';
|
||||
import { calendar, personCircle, map, informationCircle } from 'ionicons/icons';
|
||||
|
||||
|
||||
export const TabsExample: React.FC = () => (
|
||||
<IonTabs>
|
||||
<IonTabBar slot="bottom">
|
||||
<IonTabButton tab="schedule">
|
||||
<IonIcon name="calendar" />
|
||||
<IonIcon icon={calendar} />
|
||||
<IonLabel>Schedule</IonLabel>
|
||||
<IonBadge>6</IonBadge>
|
||||
</IonTabButton>
|
||||
|
||||
<IonTabButton tab="speakers">
|
||||
<IonIcon name="person-circle" />
|
||||
<IonIcon icon={personCircle} />
|
||||
<IonLabel>Speakers</IonLabel>
|
||||
</IonTabButton>
|
||||
|
||||
<IonTabButton tab="map">
|
||||
<IonIcon name="map" />
|
||||
<IonIcon icon={map} />
|
||||
<IonLabel>Map</IonLabel>
|
||||
</IonTabButton>
|
||||
|
||||
<IonTabButton tab="about">
|
||||
<IonIcon name="information-circle" />
|
||||
<IonIcon icon={informationCircle} />
|
||||
<IonLabel>About</IonLabel>
|
||||
</IonTabButton>
|
||||
</IonTabBar>
|
||||
|
||||
Reference in New Issue
Block a user