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

27 lines
406 B
Markdown
Raw Normal View History

2019-10-08 13:34:34 +08:00
# Icon
```html
<n-button @click="emitMessage">
Hourglass Icon
</n-button>
```
```js
2019-10-25 12:48:10 +08:00
import mdHourglass from 'naive-ui/lib/icons/md-hourglass'
2019-10-24 18:04:31 +08:00
2019-10-08 13:34:34 +08:00
export default {
data() {
return {}
},
methods: {
emitMessage() {
this.$NMessage.warning("I never needed anybody's help in any way", {
2019-12-06 18:23:01 +08:00
icon: h => h(mdHourglass)
2019-10-08 13:34:34 +08:00
})
}
}
}
```
```css
.n-button {
margin: 0 12px 8px 0
}
```