docs(react): updating icon usages

This commit is contained in:
Ely Lucas
2020-02-20 16:08:23 -07:00
committed by GitHub
parent 972e361bdc
commit 714ecaae65
29 changed files with 1419 additions and 1278 deletions

View File

@ -97,6 +97,7 @@ This attribute specifies the size of the button. Setting this attribute will cha
import React from 'react';
import { IonButton, IonIcon, IonContent } from '@ionic/react';
import { star } from 'ionicons/icons';
export const ButtonExample: React.FC = () => (
<IonContent>
@ -131,17 +132,17 @@ export const ButtonExample: React.FC = () => (
{/*-- Icons --*/}
<IonButton>
<IonIcon slot="start" name="star" />
<IonIcon slot="start" icon={star} />
Left Icon
</IonButton>
<IonButton>
Right Icon
<IonIcon slot="end" name="star" />
<IonIcon slot="end" icon={star} />
</IonButton>
<IonButton>
<IonIcon slot="icon-only" name="star" />
<IonIcon slot="icon-only" icon={star} />
</IonButton>
{/*-- Sizes --*/}

View File

@ -2,6 +2,7 @@
import React from 'react';
import { IonButton, IonIcon, IonContent } from '@ionic/react';
import { star } from 'ionicons/icons';
export const ButtonExample: React.FC = () => (
<IonContent>
@ -36,17 +37,17 @@ export const ButtonExample: React.FC = () => (
{/*-- Icons --*/}
<IonButton>
<IonIcon slot="start" name="star" />
<IonIcon slot="start" icon={star} />
Left Icon
</IonButton>
<IonButton>
Right Icon
<IonIcon slot="end" name="star" />
<IonIcon slot="end" icon={star} />
</IonButton>
<IonButton>
<IonIcon slot="icon-only" name="star" />
<IonIcon slot="icon-only" icon={star} />
</IonButton>
{/*-- Sizes --*/}