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

50 lines
854 B
Markdown
Raw Normal View History

2019-12-08 17:21:44 +08:00
# Text Button
```html
<n-button text size="large">
<template v-slot:icon>
<n-icon>
<cash-outline />
</n-icon>
</template>
Default
</n-button>
<br />
<n-button text type="primary" ghost size="large">
<template v-slot:icon>
<n-icon>
<cash-outline />
</n-icon>
</template>
</n-button>
<br />
<n-button text type="info" loading size="small">Info</n-button>
<br />
2019-12-08 17:21:44 +08:00
<n-button text type="success">Success</n-button>
<br />
2019-12-08 17:21:44 +08:00
<n-button text type="warning">Warning</n-button>
<br />
<n-button text type="error" icon-placement="right">
<template v-slot:icon>
<n-icon>
<cash-outline />
</n-icon>
</template>
Error
</n-button>
<br />
```
```js
import cashOutline from 'naive-ui/lib/icons/cash-outline'
export default {
components: {
cashOutline
}
}
2019-12-08 17:21:44 +08:00
```
```css
.n-button {
margin: 0 8px 8px 0;
}
```