In order to simplify the process of handling icons and improve DX, the way in which Icon components set icons' size has been changed. To begin with, the default icon size in the .svgrrc file has been changed from 48px to 28px. In that way, we don't have to create a CSS class just to override it for icons rendered with the "default" size. When theming comes into play, we'll need to reexamine this strategy as changing the default size might be challenging. In addition, the "scheme" for defining CSS rules for sizing icons has been changed from numbers to letters. I.e., .icon-xs instead of .icon-size-16. Lastly, the option to give an arbitrarily large size was added. That means that mounting an <Icon size="0.75rem" /> or <Icon size=10" /> is gonna set the width and height of the final SVG to given value without needing to define a CSS class for such size. Nonetheless, we need to revisit it later when allowing themes based on CSS Logical Properties.
4 lines
52 B
Text
4 lines
52 B
Text
{
|
|
"icon": 28,
|
|
"plugins": ["@svgr/plugin-jsx"]
|
|
}
|