From 545a65f260e8044402b97e92f3a7ec275f9dcddc Mon Sep 17 00:00:00 2001 From: Zohaib Ijaz Date: Fri, 12 Jan 2024 21:04:23 +0500 Subject: [PATCH] Fixed minor style issue --- src/components/Color/index.tsx | 16 ++++++++-------- src/components/ProductList/index.tsx | 1 + src/components/Products/index.tsx | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/components/Color/index.tsx b/src/components/Color/index.tsx index ad2a213..794e903 100644 --- a/src/components/Color/index.tsx +++ b/src/components/Color/index.tsx @@ -1,14 +1,8 @@ -type ColorProps = React.ComponentPropsWithoutRef<'div'> & { +type Props = React.ComponentPropsWithoutRef<'div'> & { color: string; }; -export const colorMap: Record = { - Black: '#000000', - Red: '#FF0000', - Stone: '#EFCFB6', -}; - -export default function Color({ color, ...rest }: ColorProps) { +export default function Color({ color, ...rest }: Props) { return (
); } + +export const colorMap: Record = { + Black: '#000000', + Red: '#FF0000', + Stone: '#EFCFB6', +}; diff --git a/src/components/ProductList/index.tsx b/src/components/ProductList/index.tsx index 6ad40ae..82f09a6 100644 --- a/src/components/ProductList/index.tsx +++ b/src/components/ProductList/index.tsx @@ -1,6 +1,7 @@ import ProductItem, { type Product } from '@/components/ProductItem'; type Props = { products: Product[] }; + export default function ProductList({ products }: Props) { return (
diff --git a/src/components/Products/index.tsx b/src/components/Products/index.tsx index 2026289..4033726 100644 --- a/src/components/Products/index.tsx +++ b/src/components/Products/index.tsx @@ -15,7 +15,7 @@ export default function Products() { colorOptions={colorOptions} color={color} onChange={setColor} - className="w-full max-w-xs" + className="w-full sm:max-w-xs" />