Apologies if this isn’t in the correct category.
Hello,
I am trying to use the IonIcon
component:
<IonChip>
<IonIcon name="clock" color="primary" />
<IonLabel>Label</IonLabel>
</IonChip>
But I can’t get it to work with the clock icon (or almost any icon, it only seems to work with the close
icon).
I am using "@ionic/react": "^4.11.0",
and "ionicons": "^4.6.3",
.
Any help is appreciated.
I’ve never used ionic/react is the language different from standard Ionic code??
<ion-chip>
<ion-icon name="clock"></ion-icon>
<ion-label>Label</ion-label>
</ion-chip>
import { addIcons } from "ionicons";
import { clock } from "ionicons/icons";
addIcons({
"ios-clock": clock.ios,
"md-clock": clock.md
});
Hi,
Please import icon from ionicons/icons as shown below
import { alarmOutline } from ‘ionicons/icons’;
use it in your code as follows