change how we create/edit clients
This commit is contained in:
committed by
Carl-Gerhard Lindesvärd
parent
7f8d857508
commit
bface463e2
21
apps/dashboard/src/components/animate-height.tsx
Normal file
21
apps/dashboard/src/components/animate-height.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import ReactAnimateHeight from 'react-animate-height';
|
||||
|
||||
type Props = {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
open: boolean;
|
||||
};
|
||||
|
||||
const AnimateHeight = ({ children, className, open }: Props) => {
|
||||
return (
|
||||
<ReactAnimateHeight
|
||||
duration={300}
|
||||
height={open ? 'auto' : 0}
|
||||
className={className}
|
||||
>
|
||||
{children}
|
||||
</ReactAnimateHeight>
|
||||
);
|
||||
};
|
||||
|
||||
export default AnimateHeight;
|
||||
Reference in New Issue
Block a user