diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2024-02-20 22:27:06 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2024-02-20 22:27:06 +0700 |
| commit | 5d3807a89596958a1e23e02ae11f73a2474c3432 (patch) | |
| tree | 96bca01ec8b73fc8fc3d82dd019198460e75050d /src-migrate/components/ui | |
| parent | 30da2d088793cabfb3c5b21d4560df53187e7047 (diff) | |
Update smooth render function
Diffstat (limited to 'src-migrate/components/ui')
| -rw-r--r-- | src-migrate/components/ui/smooth-render.tsx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src-migrate/components/ui/smooth-render.tsx b/src-migrate/components/ui/smooth-render.tsx index 0e9a4096..5de3b28d 100644 --- a/src-migrate/components/ui/smooth-render.tsx +++ b/src-migrate/components/ui/smooth-render.tsx @@ -4,9 +4,9 @@ import clsxm from '~/libs/clsxm' type Props = { children: React.ReactNode, isLoaded: boolean, - height: number, - duration?: number - delay?: number + height: string, + duration?: string + delay?: string } & React.HTMLProps<HTMLDivElement> const SmoothRender = (props: Props) => { @@ -26,9 +26,9 @@ const SmoothRender = (props: Props) => { className={clsxm('overflow-y-hidden transition-all', className)} style={{ opacity: isLoaded ? 1 : 0, - height: isLoaded ? `${height}px` : 0, - transitionDuration: `${duration}ms`, - transitionDelay: `${delay}ms`, + height: isLoaded ? height : 0, + transitionDuration: duration || '', + transitionDelay: delay || '', ...style }} {...rest} |
