Open am0wa opened 3 months ago
astro-icon
v1.1.0
Astro v4.4.11 Node v18.16.1 System macOS (x64) Package Manager unknown Output static Adapter none Integrations astro-icon @astrojs/starlight @astrojs/tailwind
No response
Type error when passing size as string specifying units.
size
<> {icon && <Icon name={emojiName} size="1.999em" />} </> {/* error ts(2322): Type 'string' is not assignable to type 'number'. */}
Expected: make size?: string to be able to specify units aka rem, em, px, etc. similar to real SVG width/height attributes
size?: string
rem, em, px, etc.
https://stackblitz.com/edit/github-ekzvvi?file=astro.config.mjs,src%2Fpages%2Findex.astro
What version of
astro-icon
are you using?v1.1.0
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Type error when passing
size
as string specifying units.What's the expected result?
Expected: make
size?: string
to be able to specify units akarem, em, px, etc.
similar to real SVG width/height attributesLink to Minimal Reproducible Example
https://stackblitz.com/edit/github-ekzvvi?file=astro.config.mjs,src%2Fpages%2Findex.astro