Skip to content

Commit

Permalink
Fixed minor style issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mzohaibqc committed Jan 12, 2024
1 parent 1e3c1ab commit 545a65f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/components/Color/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
type ColorProps = React.ComponentPropsWithoutRef<'div'> & {
type Props = React.ComponentPropsWithoutRef<'div'> & {
color: string;
};

export const colorMap: Record<string, string> = {
Black: '#000000',
Red: '#FF0000',
Stone: '#EFCFB6',
};

export default function Color({ color, ...rest }: ColorProps) {
export default function Color({ color, ...rest }: Props) {
return (
<div
{...rest}
Expand All @@ -19,3 +13,9 @@ export default function Color({ color, ...rest }: ColorProps) {
</div>
);
}

export const colorMap: Record<string, string> = {
Black: '#000000',
Red: '#FF0000',
Stone: '#EFCFB6',
};
1 change: 1 addition & 0 deletions src/components/ProductList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import ProductItem, { type Product } from '@/components/ProductItem';

type Props = { products: Product[] };

export default function ProductList({ products }: Props) {
return (
<div data-testid="products-list" className="grid grid-cols-1 gap-4 flex-1">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Products/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
</div>
<div className="flex flex-col lg:flex-row gap-4 pb-6">
Expand Down

0 comments on commit 545a65f

Please sign in to comment.