Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use icons in freeSet in r2.0.1 #36

Open
BugsCollector opened this issue Apr 6, 2021 · 1 comment
Open

How to use icons in freeSet in r2.0.1 #36

BugsCollector opened this issue Apr 6, 2021 · 1 comment

Comments

@BugsCollector
Copy link

BugsCollector commented Apr 6, 2021

I have installed coreui/icons r2.0.1 via npm, and in src/index.js:
React.icons = icons

While, I try to use cli-cart as follow:
<CIcon content="cil-cart" />

The console log tells me:
CIcon component: icon name 'cil-cart' does not exist in React.icons object. To use icons by name prop you need to make them available globally by adding them to React.icons object. CIcon component docs: https://coreui.io/react/docs/components/CIcon

I follow the steps in:
coreui/coreui-react#177
https://stackoverflow.com/questions/62840344/coreui-icon-doesnt-appear-in-my-react-js-app

But it doesn't show any icons? Do I miss something?

Thanks.

@xidedix
Copy link
Member

xidedix commented Apr 6, 2021

@eraccn

  • make sure you've got import and export of cilCart in file src/assets/icons/index.js
  • then <CIcon name="cilCart" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants