dashboard-v2: pin dropdown animation to toggle
This commit is contained in:
parent
2c2a1259d3
commit
10dde68875
|
@ -7,13 +7,10 @@ import { ChevronDownIcon } from "../Icons";
|
||||||
|
|
||||||
const dropDown = keyframes`
|
const dropDown = keyframes`
|
||||||
0% {
|
0% {
|
||||||
transform: scaleY(0);
|
transform: rotateX(-90deg);
|
||||||
}
|
|
||||||
80% {
|
|
||||||
transform: scaleY(1.1);
|
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
transform: scaleY(1);
|
transform: rotateX(0deg);
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -35,10 +32,11 @@ const Flyout = styled.div.attrs(({ open }) => ({
|
||||||
bg-white shadow-md shadow-palette-200/50
|
bg-white shadow-md shadow-palette-200/50
|
||||||
${open ? "visible" : "invisible"}`,
|
${open ? "visible" : "invisible"}`,
|
||||||
}))`
|
}))`
|
||||||
|
transform-origin: top center;
|
||||||
animation: ${({ open }) =>
|
animation: ${({ open }) =>
|
||||||
open
|
open
|
||||||
? css`
|
? css`
|
||||||
${dropDown} 0.1s ease-in-out
|
${dropDown} .15s ease-in-out forwards;
|
||||||
`
|
`
|
||||||
: "none"};
|
: "none"};
|
||||||
`;
|
`;
|
||||||
|
|
Reference in New Issue