Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/@vuepress/theme-default/global-components/Badge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export default {
},
render (h, { props, slots }) {
return h('span', {
class: ['badge', props.type, props.vertical]
class: ['badge', props.type],
style: {
verticalAlign: props.vertical
}
}, props.text || slots().default)
}
}
Expand All @@ -29,16 +32,13 @@ export default {
border-radius 3px
padding 0 6px
color white
margin-right 5px
background-color #42b983
&.middle
vertical-align middle
&.top
vertical-align top
&.tip, &.green
background-color #42b983
&.error
background-color #DA5961 //#f66
&.warning, &.warn, &.yellow
background-color darken(#ffe564, 35%)
& + &
margin-left 5px
</style>