Open janhassel opened 1 month ago
Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.
If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.
Thanks for pointing this out! I'm not sure why this wasn't done with the icons size
prop update in v11. Is there a design-based blocker of some kind @carbon-design-system/design?
Good point @janhassel!
@tay1orjones we could introduce a size prop for pictograms that follows the sizes specified in IDL. This would probably encourage users to adhere to those specific sizes, and as mentioned the size prop could help enforce consistency across implementations.
The problem
The usage guidelines for pictograms specify five supported sizes: 48/64/80/96/128.
With Carbon v11, the icons (
@carbon/react/icons
) have received an API update allowing asize
prop. The pictograms (@carbon/pictograms-react
) however don't support this and the only way to scale them without CSS is to provideprops.width
andprops.height
which will be spread on the SVG element and overwrite the default 64px (undocumented).Is there a reason for this or could we add an official
size
prop to have a consistent API between icons and pictograms?The solution
Add a
size
prop to all pictograms in@carbon/pictograms-react
. Since it's using the same base component as icons, this should be rather straight-forward to implement.Examples
No response
Application/PAL
No response
Business priority
Low Priority = release date is not dependent on fix or not upcoming
Available extra resources
No response
Code of Conduct