Skip to content

Update props spread, fix fill color, fix props type inference - #6

Open
mtonc wants to merge 1 commit into
dzeiocom:masterfrom
mtonc:bugfix/fix-fill-colors
Open

mtonc wants to merge 1 commit into
dzeiocom:masterfrom
mtonc:bugfix/fix-fill-colors

Conversation

@mtonc

@mtonc mtonc commented Aug 18, 2025

Copy link
Copy Markdown

Changed const size = Astro.props.size to const { size, ...props} = Astro.props and then on the component changed {....Astro.props} to {...props}. This was causing certain properties to be overwritten and now will preserve any other SVG attributes passed in such as stroke.

Also updated the build.js file to only replace the color comment and not the full fill=<!--color-->;

Changed export type Props to import type Props so type-hinting could be inferred and allow SVG props to be passed in.

Also changed the 'currentColor' on the fill. No color was set on a parent element, so this was not doing anything.

@mtonc

mtonc commented Aug 18, 2025

Copy link
Copy Markdown
Author

P.S. Here's a screen cap of the icons with colors working
Screenshot from 2025-08-18 01-30-50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant