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

Export Icon from the package #827

Open
rfearing opened this issue Nov 20, 2024 · 3 comments
Open

Export Icon from the package #827

rfearing opened this issue Nov 20, 2024 · 3 comments
Labels
brand bug Something isn't working

Comments

@rfearing
Copy link
Contributor

rfearing commented Nov 20, 2024

Icon was released in release 0.42.0 but not exported, so it can't be used. It just needs to be exported from packages/react/src/index.ts I believe

@rfearing rfearing added bug Something isn't working brand labels Nov 20, 2024
@joshfarrant
Copy link
Contributor

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 🙂

@rfearing
Copy link
Contributor Author

rfearing commented Nov 21, 2024

@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?

@joshfarrant
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brand bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants