ionicons icon indicating copy to clipboard operation
ionicons copied to clipboard

documentation states to use kebab-case and its camel case for icons

Open travbus opened this issue 4 years ago • 3 comments

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 }; },

travbus avatar Nov 01 '20 17:11 travbus

<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!!!!!!

travbus avatar Nov 02 '20 03:11 travbus

Yes, this tripped me up as well! Thank you @travbus

sdras avatar Aug 23 '21 01:08 sdras

I am trying to use this solution with success:

https://www.code-helper.com/answers/ion-icons-vue-import

gregdavies91 avatar Dec 21 '21 15:12 gregdavies91

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!

mapsandapps avatar May 18 '23 23:05 mapsandapps