Files
react-test/docs/data/material/getting-started/templates/crud-dashboard/mixins.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
595 B
TypeScript
Raw Normal View History

2025-12-12 14:26:25 +09:00
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',
};
}