securityos/components/system/Taskbar/TaskbarEntry/useTaskbarTransition.ts

25 lines
580 B
TypeScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
import type { MotionProps } from "framer-motion";
import { useTheme } from "styled-components";
import { TRANSITIONS_IN_SECONDS } from "utils/constants";
const useTaskbarTransition = (): MotionProps => {
const {
sizes: { taskbar },
} = useTheme();
return {
animate: "active",
exit: "initial",
initial: "initial",
transition: {
duration: TRANSITIONS_IN_SECONDS.WINDOW,
},
variants: {
active: { width: taskbar.entry.maxWidth },
initial: { width: 0 },
},
};
};
export default useTaskbarTransition;