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({
4949 }
5050 } ,
5151 } ,
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+ } ,
5262 /**
5363 * Expand narrowed sidebar on hover.
5464 */
@@ -60,7 +70,10 @@ const CSidebar = defineComponent({
6070 /**
6171 * Toggle the visibility of sidebar component.
6272 */
63- visible : Boolean ,
73+ visible : {
74+ type : Boolean ,
75+ default : undefined ,
76+ } ,
6477 } ,
6578 setup ( props , { slots } ) {
6679 return ( ) =>
@@ -76,8 +89,10 @@ const CSidebar = defineComponent({
7689 [ `sidebar-self-hiding${
7790 typeof props . selfHiding !== 'boolean' && '-' + props . selfHiding
7891 } `] : props . selfHiding ,
92+ [ `sidebar-${ props . size } ` ] : props . size ,
7993 'sidebar-narrow-unfoldable' : props . unfoldable ,
80- show : props . visible ,
94+ show : props . visible === true ,
95+ hide : props . visible === false ,
8196 } ,
8297 ] ,
8398 } ,
You can’t perform that action at this time.
0 commit comments