mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
feat: implement browse by manufacturers section
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
29
components/manufacturers-grid/item.tsx
Normal file
29
components/manufacturers-grid/item.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import ImageDisplay from 'components/page/image-display';
|
||||
import { Metaobject } from 'lib/shopify/types';
|
||||
import { Suspense } from 'react';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
const ManufacturerItem = ({
|
||||
manufacturer,
|
||||
className
|
||||
}: {
|
||||
manufacturer: Metaobject;
|
||||
className?: string;
|
||||
}) => {
|
||||
return (
|
||||
<div className={twMerge('flex w-full flex-row items-center justify-between', className)}>
|
||||
<span className="text-sm leading-5">{manufacturer.display_name}</span>
|
||||
<div className="hidden md:block">
|
||||
<Suspense>
|
||||
<ImageDisplay
|
||||
fileId={manufacturer.logo as string}
|
||||
title={manufacturer.display_name || 'Logo'}
|
||||
className="aspect-2 h-auto w-auto"
|
||||
/>
|
||||
</Suspense>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ManufacturerItem;
|
Reference in New Issue
Block a user