Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
21 lines
595 B
TypeScript
21 lines
595 B
TypeScript
import { type Theme } from '@mui/material/styles';
|
|
|
|
export function getDrawerSxTransitionMixin(isExpanded: boolean, property: string) {
|
|
return {
|
|
transition: (theme: Theme) =>
|
|
theme.transitions.create(property, {
|
|
easing: theme.transitions.easing.sharp,
|
|
duration: isExpanded
|
|
? theme.transitions.duration.enteringScreen
|
|
: theme.transitions.duration.leavingScreen,
|
|
}),
|
|
};
|
|
}
|
|
|
|
export function getDrawerWidthTransitionMixin(isExpanded: boolean) {
|
|
return {
|
|
...getDrawerSxTransitionMixin(isExpanded, 'width'),
|
|
overflowX: 'hidden',
|
|
};
|
|
}
|