Open rfearing opened 6 days ago
Hi @rfearing! 👋 Thanks for raising this.
When we introduced the component we made a conscious decision to keep it as an internal component for now. Currently, it's accessible through Card.Icon
component and Bento.Content[leadingVisual]
prop since these were the primary use cases we had in mind.
If you have specific use cases where you need Icon
as a standalone component just let me know the specifics and we can reassess the decision 🙂
@joshfarrant I think either I'm missing something obvious, or there was an oversight.
How do I put the Icon
into the Bento.Content[leadingVisual]
prop if Icon
is never exported? In the storybook story for Bento, it is utilized as a relative import. I can't do that via an npm package.
I believe either the Icon
component would need to be exported or a Bento.Icon
created, right?
Ah, you're absolutely right @rfearing, thank you for spotting this. It is indeed an oversight on my part!
@rezrah Are you happy for Icon
to be exported as a public component? An alternative could be to create a Bento.Icon
component which reexports Icon
(in the same way we do in Card
) which could then be used inside the leadingVisual
prop. wdyt?
Icon
was released in release0.42.0
but not exported, so it can't be used. It just needs to be exported frompackages/react/src/index.ts
I believe