- Created a new mixin (ExpandSidenavMixin) that sets the defaultVisible prop that can be used in both the root component and the SidenavToggler. This makes it so that the Root knows whether or not the sidenav is collapsed or expanded, so then child components can use this to calculate margins/paddings/offsets/etc. - Added new classes for the .action-group-footer that set the elements padding based on whether or not the sidenav is expanded. - Added a nested div (.action-group-footer--container) inside .action-group-footer which sets the max width
16 lines
330 B
JavaScript
16 lines
330 B
JavaScript
export default {
|
|
props: {
|
|
cookieName: 'expandSidenav',
|
|
defaultVisible: {
|
|
type: Boolean,
|
|
default: function() {
|
|
if (document.cookie.match(this.cookieName)) {
|
|
return !!document.cookie.match(this.cookieName + ' *= *true')
|
|
} else {
|
|
return true
|
|
}
|
|
},
|
|
},
|
|
},
|
|
}
|