@beyonk/svelte-awesome
v0.0.2
Published
Font Awesome component for Svelte JS, using inline SVG
Downloads
68
Readme
Svelte-Awesome
Awesome SVG icon component for Svelte JS, built with Font Awesome icons. Based on Justineo/vue-awesome
Svelte-Awesome is built upon Font-Awesome v4.7.0
A demo is available here
Installation
NPM
$ npm install --save svelte-awesome
Usage
import Icon from 'svelte-awesome/src/components/Icon.html'
import beer from 'svelte-awesome/src/icons/beer'
export default {
data () {
return {
beer
}
},
components: {
Icon
}
}
<!-- basic -->
<Icon data="{beer}"></Icon>
<!-- with options -->
<Icon data="{refresh}" scale="2"></Icon>
<Icon data="{comment}" flip="horizontal"></Icon>
<Icon data="{code-fork}" label="Forked Repository"></Icon>
<!-- stacked icons [WIP] -->
<Icon label="No Photos">
<Icon data="{camera}"></Icon>
<Icon data="{ban}" scale="2" class="alert"></Icon>
</Icon>