diff --git a/src/components/domain/card/suggest-card/SuggestCard.stories.tsx b/src/components/domain/card/suggest-card/SuggestCard.stories.tsx new file mode 100644 index 00000000..de6b0705 --- /dev/null +++ b/src/components/domain/card/suggest-card/SuggestCard.stories.tsx @@ -0,0 +1,31 @@ +import type { Meta, StoryObj } from '@storybook/react' +import SuggestCard from './SuggestCard' + +const meta = { + title: 'DOMAIN/SuggestCard', + component: SuggestCard, + tags: ['autodocs'], + argTypes: {}, +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Normal: Story = { + args: { + cardTitle: '에어팟 맥스 교환해요', + itemName: '에어팟 맥스', + priceRange: '30만원대', + suggestionType: '오퍼하기', + }, + render: () => { + return ( + + ) + }, +} diff --git a/src/components/domain/card/suggest-card/SuggestCard.tsx b/src/components/domain/card/suggest-card/SuggestCard.tsx new file mode 100644 index 00000000..81fbc64f --- /dev/null +++ b/src/components/domain/card/suggest-card/SuggestCard.tsx @@ -0,0 +1,52 @@ +import Button from '@/components/ui/Button' +import Card from '@/components/ui/Card' +import { CardFlex, CardImage, CardText } from '@/components/ui/Card/Card' +import { DEFAULT_ITEM_THUMBNAIL_IMG } from '@/constants/image' + +type SuggestCardProps = { + thumbNail?: string + cardTitle: string + itemName: string + priceRange: string + suggestionType: string +} + +const SuggestCard = ({ + thumbNail = DEFAULT_ITEM_THUMBNAIL_IMG, + cardTitle, + itemName, + priceRange, + suggestionType, +}: SuggestCardProps) => { + return ( + + +
+ +
+ + {cardTitle} + {itemName} + {priceRange} +
+ +
+
+
+
+ ) +} + +export default SuggestCard diff --git a/src/components/domain/card/suggest-card/index.tsx b/src/components/domain/card/suggest-card/index.tsx new file mode 100644 index 00000000..efb624fb --- /dev/null +++ b/src/components/domain/card/suggest-card/index.tsx @@ -0,0 +1,3 @@ +import { default as SuggestCard } from './SuggestCard' + +export default SuggestCard diff --git a/src/components/ui/Button/Button.tsx b/src/components/ui/Button/Button.tsx index ccb3dbc5..5839e4cc 100644 --- a/src/components/ui/Button/Button.tsx +++ b/src/components/ui/Button/Button.tsx @@ -17,6 +17,7 @@ const buttonVariants = cva( size: { default: 'h-8 px-4 py-2', icon: 'h-10 w-10', + sm: 'h-6 px-4 text-xs', }, rounded: { default: 'rounded-md', diff --git a/src/constants/image.ts b/src/constants/image.ts index 29b794a8..ce2be586 100644 --- a/src/constants/image.ts +++ b/src/constants/image.ts @@ -1,4 +1,4 @@ const DEFAULT_PROFILE_IMG = 'https://github.com/shadcn.png' -const DEFAULT_ITEM_IMG = ''; +const DEFAULT_ITEM_THUMBNAIL_IMG = 'https://cdn.cetizen.com/CDN/market/market_large_crop/202203/20220318/220318152808_1_2913635.jpg'; -export {DEFAULT_PROFILE_IMG, DEFAULT_ITEM_IMG} +export {DEFAULT_PROFILE_IMG, DEFAULT_ITEM_THUMBNAIL_IMG}