naive-ui/demo/documentation/components/button/enUS/icon.md

30 lines
393 B
Markdown
Raw Normal View History

2019-09-20 00:27:06 +08:00
# Icon
Using icon in button
```html
2019-10-24 18:04:31 +08:00
<n-button>
<template v-slot:icon>
<md-save />
</template>
Save
</n-button>
<n-button icon-position="right">
<template v-slot:icon>
<md-save />
</template>
Save
</n-button>
```
```js
import mdSave from 'naive-ui/packages/icons/md-save'
export default {
components: {
mdSave
}
}
2019-09-20 00:27:06 +08:00
```
```css
.n-button {
margin: 0 8px 8px 0;
}
```