commerce/components/label.tsx
2023-08-13 17:14:30 +09:00

29 lines
598 B
TypeScript

import clsx from 'clsx';
import Price from './price';
const Label = ({
title,
amount,
currencyCode
}: {
title: string;
amount: string;
currencyCode: string;
}) => {
return (
<div className={clsx('@container/label')}>
<div className="flex flex-col space-y-2">
<h3 className="mr-4 line-clamp-2 flex-grow text-3xl">{title}</h3>
<Price
className="flex-none"
amount={amount}
currencyCode={currencyCode}
currencyCodeClassName="hidden @[275px]/label:inline"
/>
</div>
</div>
);
};
export default Label;