Coder Social home page Coder Social logo

Comments (12)

joshblack avatar joshblack commented on May 25, 2024 1

Thanks @anupamsomani1! You are using v6.3.2, but those icons are available in 7.0.7. Updating should help!

from carbon-icons.

joshblack avatar joshblack commented on May 25, 2024

Hi @anupamsomani1! πŸ‘‹ Could you share the package version for carbon-icons that you are using? These should show up in v7 of the icons πŸ˜„

from carbon-icons.

anupamsomani1 avatar anupamsomani1 commented on May 25, 2024
"carbon-addons-cloud": "^2.1.0",
"carbon-addons-cloud-react": "1.3.0",
"carbon-components": "9.7.1",
"carbon-components-react": "6.20.0",
"carbon-icons": "^6.3.2",

from carbon-icons.

anupamsomani1 avatar anupamsomani1 commented on May 25, 2024

Yeah I tried that but still when I am using below code that Image was not rendering

<DetailPageHeader title="Detail Page Header">
        <Icon name="watson" />
</DetailPageHeader>

screen shot 2018-08-20 at 3 09 17 pm

from carbon-icons.

asudoh avatar asudoh commented on May 25, 2024

Hi πŸ‘‹ do you want to create a reduced case, based on https://codesandbox.io/s/x2mjypo6pp? Thanks!

from carbon-icons.

anupamsomani1 avatar anupamsomani1 commented on May 25, 2024

Hi @asudoh That was strange in codesandbox It's working but when I am trying to integrate in our solution then the issue will comes up.
So here my question is there is any need to import carbon-icons ?
I think 'carbon-components-react' has duty to import carbon-icons is my understanding correct ?

from carbon-icons.

joshblack avatar joshblack commented on May 25, 2024

@anupamsomani1 carbon-icons is listed as a peerDependency on the project πŸ‘

https://github.com/IBM/carbon-components-react/blob/052822271c4663c153e25bd92f00ccb49e278153/package.json#L122

from carbon-icons.

anupamsomani1 avatar anupamsomani1 commented on May 25, 2024

Then how npm install work.. Its not going to download auto peerDependency packages

from carbon-icons.

asudoh avatar asudoh commented on May 25, 2024

Hi again πŸ‘‹ npm i -S carbon-icons would be something you’d want - Hope it helps!

from carbon-icons.

anupamsomani1 avatar anupamsomani1 commented on May 25, 2024

I am able to get all carbon-icons and when I am writing the way : import { iconAddSolid } from 'carbon-icons'; It was working so this is right way to do ?

from carbon-icons.

asudoh avatar asudoh commented on May 25, 2024

In case this is what you are asking; <Icon> as of today has two ways to use - One is <Icon icon={iconSomething}> where iconSomething is a named import of carbon-icons (as you brought up). Another is <Icon name="addβ€”solid”> but it’s deprecated.

You can see the demo of all options in http://react.carbondesignsystem.com/?selectedKind=Icon&selectedStory=Default by going to Knobs tab at the bottom and changing some props there. The source code of that demo can be found at https://github.com/IBM/carbon-components-react/blob/eb8a297/src/components/Icon/Icon-story.js. Hope it helps!

from carbon-icons.

joshblack avatar joshblack commented on May 25, 2024

Going to close this as this seems more like a usage question at this point. Feel free to reach out in the #carbon-react slack channel if you have additional questions around how the <Icon> component works!

from carbon-icons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.