refactor(avatar): icon input manner

This commit is contained in:
07akioni 2019-11-22 13:27:49 +08:00
parent 109a2edc79
commit b002dc06cf
3 changed files with 6 additions and 9 deletions

View File

@ -95,7 +95,7 @@ export default {
name: 'Common Components',
childItems: [
{
name: 'Avatar (in progress)',
name: 'Avatar',
path: `/${this.lang}/${this.theme}` + '/n-avatar'
},
{

View File

@ -1,11 +1,9 @@
# Icon
```html
<n-avatar>
<template v-slot:icon>
<n-icon>
<md-cash />
</n-icon>
</template>
<n-icon>
<md-cash />
</n-icon>
</n-avatar>
```
```js

View File

@ -12,9 +12,7 @@
line-height: 1.25;
}
@include b(icon) {
position: relative;
top: 4px;
font-size: $width - 8px;
font-size: $width;
}
}
}
@ -27,6 +25,7 @@
@include b(icon) {
transition: fill .3s $default-cubic-bezier;
fill: white;
vertical-align: bottom;
}
color: white;
transition: background-color .3s $default-cubic-bezier, color .3s $default-cubic-bezier;