Skip to content

Commit f516cb4

Browse files
shigmaulivz
authored andcommitted
refactor($theme-default): badge component (#1439)
1 parent 9c354be commit f516cb4

File tree

1 file changed

+6
-6
lines changed
  • packages/@vuepress/theme-default/global-components

1 file changed

+6
-6
lines changed

Diff for: packages/@vuepress/theme-default/global-components/Badge.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ export default {
1414
},
1515
render (h, { props, slots }) {
1616
return h('span', {
17-
class: ['badge', props.type, props.vertical]
17+
class: ['badge', props.type],
18+
style: {
19+
verticalAlign: props.vertical
20+
}
1821
}, props.text || slots().default)
1922
}
2023
}
@@ -29,16 +32,13 @@ export default {
2932
border-radius 3px
3033
padding 0 6px
3134
color white
32-
margin-right 5px
3335
background-color #42b983
34-
&.middle
35-
vertical-align middle
36-
&.top
37-
vertical-align top
3836
&.tip, &.green
3937
background-color #42b983
4038
&.error
4139
background-color #DA5961 //#f66
4240
&.warning, &.warn, &.yellow
4341
background-color darken(#ffe564, 35%)
42+
& + &
43+
margin-left 5px
4444
</style>

0 commit comments

Comments
 (0)