File tree 2 files changed +46
-30
lines changed
2 files changed +46
-30
lines changed Original file line number Diff line number Diff line change
1
+ <script >
2
+ export default {
3
+ functional: true ,
4
+ props: {
5
+ type: {
6
+ type: String ,
7
+ default: ' tip'
8
+ },
9
+ text: String ,
10
+ vertical: {
11
+ type: String ,
12
+ default: ' top'
13
+ }
14
+ },
15
+ render (h , { props, slots }) {
16
+ return h (' span' , {
17
+ class: [' badge' , props .type , props .vertical ]
18
+ }, props .text || slots ().default )
19
+ }
20
+ }
21
+ </script >
22
+
23
+ <style lang="stylus">
24
+ @import '../../default-theme/styles/config.styl'
25
+
26
+ .badge
27
+ display inline-block
28
+ font-size 14px
29
+ height 18px
30
+ line-height 18px
31
+ border-radius 3px
32
+ padding 0 6px
33
+ color white
34
+ margin-right 5px
35
+ background-color #42 b9 83
36
+ & .middle
37
+ vertical-align middle
38
+ & .top
39
+ vertical-align top
40
+ & .tip , & .green
41
+ background-color #42 b9 83
42
+ & .error
43
+ background-color #DA 59 61 // #f66
44
+ & .warning , & .warn , & .yellow
45
+ background-color darken (#ff e5 64 , 35% )
46
+ </style >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments