vue-ss
Version:
SVG sprites component for symbol id base on VueJS
59 lines (41 loc) • 987 B
Markdown
[](https://www.npmjs.org/package/vue-ss) [](https://travis-ci.org/rwu823/vue-ss/) [](https://coveralls.io/github/rwu823/vue-ss)
# vue-ss
SVG sprites Component for `<symbol>` id, it is based on VueJS
## Install
```sh
npm i --save vue-ss
```
## Usage
```javascript
// app.vue
<template>
<Icon typ="add" size="32x32"></Icon>
</template>
<script>
import Icon from 'vue-ss'
module.exports = {
components: {
Icon
}
}
</script>
```
## Props
```javascript
props: {
size: {
type: [String, Number],
default: '20x20'
},
typ: {
type: String,
required: true,
default: 'add',
}
},
```
## Colorize
The component exports as standrad `<svg>` tag, you can thro `fill` attribute to colorize it free
```javascript
<Icon fill="#f00"></Icon>
```