Looking to add copy + paste react code to the website icon library. We want avoid giving a hard-coded size (<Add32 />).
A generic <Add size='sm/md/lg/xl' /> component would make for a much better candidate for copy+paste. The current API makes it hard to know what sizes are available, users are more likely to have a failed import than a prop-type failure.
I think our initial implementation of this package was beholden to the idea that we’d come up with hand tuned, bespoke icon assets at each size. This isn’t scaleable and results in idiosyncrasies when components are used together. (Example + and -).
By simply reducing the width of the 32 px svg and scaling down, we'd be able to accomodate all 4 sizes with a single component.
Looking to add copy + paste react code to the website icon library. We want avoid giving a hard-coded size (
<Add32 />
).A generic
<Add size='sm/md/lg/xl' />
component would make for a much better candidate for copy+paste. The current API makes it hard to know what sizes are available, users are more likely to have a failed import than a prop-type failure.I think our initial implementation of this package was beholden to the idea that we’d come up with hand tuned, bespoke icon assets at each size. This isn’t scaleable and results in idiosyncrasies when components are used together. (Example + and -).
By simply reducing the
width
of the32
px svg and scaling down, we'd be able to accomodate all 4 sizes with a single component.