Introvertuous / svelte-icons

Icon components for svelte
https://svelte-icons.vercel.app
292 stars 21 forks source link

Add common style props #46

Open NEO97online opened 3 years ago

NEO97online commented 3 years ago

Svelte now supports style props: https://svelte.dev/docs#style_props

It allows you to pass props that can be used in css variables. We should add "color" and "size" as style props to avoid needing to write a wrapper element for styling.

The README example would be shortened to:

<script>
  import ChevronCircleUp from 'svelte-icons/fa/FaChevronCircleUp.svelte';
</script>

<ChevronCircleUp --color="red" --size="32px" />