File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,16 @@ const CSidebar = defineComponent({
49
49
}
50
50
} ,
51
51
} ,
52
+ /**
53
+ * Size the component small, large, or extra large.
54
+ */
55
+ size : {
56
+ type : String ,
57
+ default : undefined ,
58
+ validator : ( value : string ) => {
59
+ return [ 'sm' , 'lg' , 'xl' ] . includes ( value )
60
+ } ,
61
+ } ,
52
62
/**
53
63
* Expand narrowed sidebar on hover.
54
64
*/
@@ -60,7 +70,10 @@ const CSidebar = defineComponent({
60
70
/**
61
71
* Toggle the visibility of sidebar component.
62
72
*/
63
- visible : Boolean ,
73
+ visible : {
74
+ type : Boolean ,
75
+ default : undefined ,
76
+ } ,
64
77
} ,
65
78
setup ( props , { slots } ) {
66
79
return ( ) =>
@@ -76,8 +89,10 @@ const CSidebar = defineComponent({
76
89
[ `sidebar-self-hiding${
77
90
typeof props . selfHiding !== 'boolean' && '-' + props . selfHiding
78
91
} `] : props . selfHiding ,
92
+ [ `sidebar-${ props . size } ` ] : props . size ,
79
93
'sidebar-narrow-unfoldable' : props . unfoldable ,
80
- show : props . visible ,
94
+ show : props . visible === true ,
95
+ hide : props . visible === false ,
81
96
} ,
82
97
] ,
83
98
} ,
You can’t perform that action at this time.
0 commit comments