mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
docs(react): updating icon usages
This commit is contained in:
@ -93,28 +93,29 @@ See the [tabs documentation](../tabs) for more details on configuring tabs.
|
||||
```tsx
|
||||
import React from 'react';
|
||||
import { IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel, IonContent } from '@ionic/react';
|
||||
import { calendar, personCircle, map, informationCircle } from 'ionicons/icons';
|
||||
|
||||
export const TabButtonExample: React.FC = () => (
|
||||
<IonContent>
|
||||
<IonTabs>
|
||||
<IonTabBar slot="bottom">
|
||||
<IonTabButton tab="schedule">
|
||||
<IonIcon name="calendar" />
|
||||
<IonIcon icon={calendar} />
|
||||
<IonLabel>Schedule</IonLabel>
|
||||
</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,29 @@
|
||||
```tsx
|
||||
import React from 'react';
|
||||
import { IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel, IonContent } from '@ionic/react';
|
||||
import { calendar, personCircle, map, informationCircle } from 'ionicons/icons';
|
||||
|
||||
export const TabButtonExample: React.FC = () => (
|
||||
<IonContent>
|
||||
<IonTabs>
|
||||
<IonTabBar slot="bottom">
|
||||
<IonTabButton tab="schedule">
|
||||
<IonIcon name="calendar" />
|
||||
<IonIcon icon={calendar} />
|
||||
<IonLabel>Schedule</IonLabel>
|
||||
</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