-
Notifications
You must be signed in to change notification settings - Fork 32
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
[Modification Request] Update the icon in Bento.Item
to appear the same as Card
(with a background)
#773
Comments
Bento.Item
to appear the same as Card
Bento.Item
to appear the same as Card
Bento.Item
to appear the same as Card
Bento.Item
to appear the same as Card
(with a background)
Hey @rfearing 👋 Following on from the discussions in yesterday's Primer Brand Office Hours, @danielguillan and I think the best way to proceed is with a dedicated Adding a new component to the library typically comprises of a few steps:
If you're still happy to work on the implementation of this yourself — which we'd be very grateful for — then here's some information on each of those steps. API explorationThe purpose of an API Exploration is to flesh out the API of new components with the Primer Brand maintainers. This is where we can discuss component naming, what props the component will accept (and the types of those props), and highlight anything that is out-of-scope for this component. As a starting point, you might want to take a look at the Typically these API explorations take place in a FigJam, however we can do it any way you prefer. If you'd like, you can instead share your proposed types for the props that the component will accept as a comment in this issue. I've got some initial thoughts on this, so let me know if you'd like some support with this 🙂 Figma implementationAfter speaking with @danielguillan, I believe there is already a private component in Figma which is used in the Card component. This will need to be made into a public-facing component so it can be consumed alongside other Primer Brand components in Figma. @danielguillan is the best person to speak to for support on this. React implementationOnce we've got the API of the component firmed-up, and the component is in Figma, then the component is ready to be implemented. By this point most of the decisions relating to this component will have been made will have been made, so building the component shouldn't be too big of a job. We'll also need to ensure that the component is tested, and that it has accompanying documentation. I'd be happy to support with this. Next stepsThanks again for offering to help with adding this component to the library. The process above might sound like a lot when it's all written out like this, but in practice it shouldn't be too big of a job. Of course, we're here to help with all stages too. If you're happy to kick off the API exploration in this issue then we can get the ball rolling! ⚽ 🚀 |
@joshfarrant Thank you so much for the super awesome explanation! Let's do it! I really like the API of the type IconProps = BaseProps<HTMLSpanElement> & {
icon: Icon // from @primer/octicons-react
color?: (typeof IconColors)[number] // same as CardIconColors?
hasBackground?: boolean
['aria-hidden']?: boolean // For Bento this would be true
} (Note, I'm happy to start a figjam if that's what's best for Brand worfklow) |
That looks good to me @rfearing! 🚀 My only suggestions would be to maybe have it extend We also don't really need the I'd be keen to get @danielguillan's thoughts on the supported colours, but keeping it consistent with type IconProps = {
icon: Icon
color?: (typeof IconColors)[number]
hasBackground?: boolean
} & HTMLAttributes<HTMLSpanElement> The only other thing to think about is the default values of |
@joshfarrant I just realized the Primer Icon has a size prop. Do you think we should include that? Card nor bento have it, but I could see it being useful. |
Good spot @rfearing. For now, I'd lean towards not adding it. We can bring that in as an enhancement in the future, but to keep things consistent my leaning would be to not add it for now |
Hey @rezrah + @joshfarrant 👋 After PB OH, I took a look at our icon instances, and I think we could approach it this way: Icon with background: Icons without backgrounds: The last three are suggested sizes we could apply to each of those existing scenarios. Let me know what you think. |
Summary
Currently the Bento's
LeadingVisual
is anOcticon
with no background.There are now new design directions about how icons should render in Bento boxes, the same way they appear in cards. (c.c. @nsolerieu):
Corresponding issue: https://github.com/github/marketing-platform-services/issues/3553
Requested update:
There be an option for the circular icon as a child of
Bento.Item
The text was updated successfully, but these errors were encountered: