diff --git a/components/product/ProductCard/ProductCard.tsx b/components/product/ProductCard/ProductCard.tsx index 5187df527..44ceb91cd 100644 --- a/components/product/ProductCard/ProductCard.tsx +++ b/components/product/ProductCard/ProductCard.tsx @@ -8,6 +8,7 @@ interface Props { className?: string children?: any node: ProductData + variant?: 'slim' } interface ProductData { @@ -17,28 +18,42 @@ interface ProductData { path: string } -const ProductCard: FC = ({ className, node: productData }) => { +const ProductCard: FC = ({ className, node: p, variant }) => { const rootClassName = cn(s.root, className) + if (variant === 'slim') { + return ( +
+ +
+ + {p.name} + +
+
+ ) + } + return ( - +
-

{productData.name}

+

{p.name}

-
- ${productData.prices.price.value} -
+
${p.prices.price.value}
diff --git a/components/ui/Marquee/Marquee.module.css b/components/ui/Marquee/Marquee.module.css index 4139a91cc..0a0afd362 100644 --- a/components/ui/Marquee/Marquee.module.css +++ b/components/ui/Marquee/Marquee.module.css @@ -1,14 +1,26 @@ .root { - @apply w-full relative; + @apply w-full; min-width: 100%; } .container { - @apply flex flex-row; + @apply flex flex-row items-center; & > * { - @apply flex-1; - min-width: 500px; + @apply flex-1 px-16 py-4; + width: 460px; + } + + & > *:after { + content: ' '; + display: block; + position: absolute; + height: 100px; + background: #999; + width: 2px; + left: 20px; + top: calc(50% - 53px); + transform: rotate(25deg); } } diff --git a/components/ui/Marquee/Marquee.tsx b/components/ui/Marquee/Marquee.tsx index 99ee6baf9..5caa959d4 100644 --- a/components/ui/Marquee/Marquee.tsx +++ b/components/ui/Marquee/Marquee.tsx @@ -18,7 +18,6 @@ const M: FC = ({ items, wrapper: Component = DefaultWrapper, variant = 'primary', - // min = 'none', }) => { const rootClassName = cn( s.root, @@ -40,17 +39,17 @@ const M: FC = ({ // ) return ( - - {({ index }) => ( -
+
+ + {({ index }) => (
{items.map((p: any) => ( ))}
-
- )} - + )} + +
) } diff --git a/pages/index.tsx b/pages/index.tsx index 7661e3c42..2866e7e4e 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -19,20 +19,8 @@ export default function Home({ <> ( -
- -
- - {p.node.name} - -
-
- )} + items={products.slice(0, 3)} + wrapper={(p: any) => } /> ( -
- -
- - {p.node.name} - -
-
- )} + wrapper={(p: any) => } />