Add base authenticated route
This commit is contained in:
23
matrixgw_frontend/src/widgets/dashboard/mixins.ts
Normal file
23
matrixgw_frontend/src/widgets/dashboard/mixins.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
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",
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user