1.0.4 • Published 3 years ago

@peter-pakanun/svelte-icon v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Svelte Icon

I want to keep it simple and play nice with Tailwind CSS. You can use this with Material Design Icons via the @mdi/js package.

Usage

npm i -D @mdi/js @peter-pakanun/svelte-icon
<script>
  import Icon from '@peter-pakanun/svelte-icon';
  import { mdiAccount } from '@mdi/js';
</script>

<Icon d={mdiAccount} class="w-4 h-4 text-red-500" />

Props

PropPropTypesDefaultDetails
dstringrequiredSVG path data.
classstringnullSVG class attribute. e.g., w-4 h-4 text-red-500
fillstringcurrentColorSVG fill color.
strokestringnullSVG stroke color.
titlestringnullcontent in title tag.