ionicons
ionicons copied to clipboard
documentation states to use kebab-case and its camel case for icons
In latest ionic-vue scaffolded project
this is fine
<ion-button class="">Login <ion-icon :icon="wine"></ion-icon>
this throws error
import { person-add } from "ionicons/icons";
this throws error
setup() { return { person-add }; },
- Declaration or statement expected.
- ';' expected.
this works
<ion-button class="">Login <ion-icon :icon="heart"></ion-icon>
this works
import { heart } from "ionicons/icons";
this works
setup() { return { heart }; },
<ion-button class="">Login <ion-icon :icon="personAdd"></ion-icon>
this works
import { personAdd } from "ionicons/icons";
this works
setup() { return { personAdd }; },
So documentation says kabob case but it should be camelCase please update!!!!!!
Yes, this tripped me up as well! Thank you @travbus
I am trying to use this solution with success:
https://www.code-helper.com/answers/ion-icons-vue-import
Hi, it looks like the documentation got updated and now shows a camel case example.
https://ionicframework.com/docs/api/icon#basic-usage
You can click on the Vue tab in the example to see the Vue syntax.
If you find documentation of the Vue syntax that doesn't include camel case, please open a new ticket with a link to the relevant docs page.
Thanks for the report!