summaryrefslogtreecommitdiff
path: root/src-migrate
diff options
context:
space:
mode:
Diffstat (limited to 'src-migrate')
-rw-r--r--src-migrate/components/ui/smooth-render.tsx12
-rw-r--r--src-migrate/modules/product-promo/components/Section.tsx4
2 files changed, 8 insertions, 8 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}
diff --git a/src-migrate/modules/product-promo/components/Section.tsx b/src-migrate/modules/product-promo/components/Section.tsx
index b3c6e671..5fc0da4c 100644
--- a/src-migrate/modules/product-promo/components/Section.tsx
+++ b/src-migrate/modules/product-promo/components/Section.tsx
@@ -27,8 +27,8 @@ const ProductPromoSection = ({ productId }: Props) => {
return (
<SmoothRender
isLoaded={(promotions?.data && promotions?.data.length > 0) || false}
- height={450}
- duration={700}
+ height='450px'
+ duration='700ms'
>
<ProductPromoModal />