19 lines
510 B
JavaScript
19 lines
510 B
JavaScript
|
|
export function getDrawerSxTransitionMixin(isExpanded, property) {
|
||
|
|
return {
|
||
|
|
transition: (theme) =>
|
||
|
|
theme.transitions.create(property, {
|
||
|
|
easing: theme.transitions.easing.sharp,
|
||
|
|
duration: isExpanded
|
||
|
|
? theme.transitions.duration.enteringScreen
|
||
|
|
: theme.transitions.duration.leavingScreen,
|
||
|
|
}),
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
export function getDrawerWidthTransitionMixin(isExpanded) {
|
||
|
|
return {
|
||
|
|
...getDrawerSxTransitionMixin(isExpanded, 'width'),
|
||
|
|
overflowX: 'hidden',
|
||
|
|
};
|
||
|
|
}
|