Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b42d513
✨[Feat] box, title, location, datetime 추가
cloud0406 Dec 12, 2024
2bcbc8f
✨[Feat] 오버레이 및 스토리북 추가
cloud0406 Dec 12, 2024
694f58b
🚚[Rename] 스토리북 코드 이전
cloud0406 Dec 12, 2024
4edb113
✨[Feat] 임시 디폴트 카드 및 스토리북 적용
cloud0406 Dec 12, 2024
8e8d476
✨[Feat] 디폴트 카드 레이아웃 구현
cloud0406 Dec 12, 2024
41a1dea
♻️[Refactor] clubchip variant추가
cloud0406 Dec 12, 2024
81c61aa
✨[Feat] 칩 수정
cloud0406 Dec 12, 2024
5ae61d4
💄[Design 레이아웃 일부 변경및 스토리북 수정
cloud0406 Dec 13, 2024
9286909
✨[Feat] 책모임, 찜하기 카드 구현 완료
cloud0406 Dec 13, 2024
b5e4f1d
Merge branch 'develop' into 140-refactor-card-리팩토링
cloud0406 Dec 13, 2024
ee8d12b
🔥[Remove] 불필요 파일 제거
cloud0406 Dec 13, 2024
59fd23a
♻️[Refactor] 오버레이 버튼 컴포넌트로 대체
cloud0406 Dec 13, 2024
9b3e06e
✨[Feat] 내가 만든 모임 카드 구현
cloud0406 Dec 13, 2024
442a96c
✨[Feat] 나의 모임 카드 구현
cloud0406 Dec 13, 2024
4346dd6
♻️[Refactor] 내가 만든모임 찜, 블러 기능 제거
cloud0406 Dec 13, 2024
cf15300
♻️[Refactor] 인터페이스 공통화 및 주석 처리
cloud0406 Dec 13, 2024
7f2ad94
♻️[Refactor] 스토리북 수정
cloud0406 Dec 13, 2024
6220db3
✨[Feat] 상세 카드 임시 레이아웃 구현 및 스토리북 적용
cloud0406 Dec 13, 2024
adaaed8
💄[Design] 상세 카드 이미지 레이아웃 수정
cloud0406 Dec 13, 2024
61ac436
✨[Feat] 상세 카드 구현 완료
cloud0406 Dec 13, 2024
fa23bd1
🚚[Rename] 스토리북 변경
cloud0406 Dec 13, 2024
7cd2a41
🚚[Rename] 불필요 코드 제거 및 이동
cloud0406 Dec 13, 2024
f6a9542
💬[Comment] 주석 처리
cloud0406 Dec 13, 2024
e8dd570
Merge branch 'develop' into 140-refactor-card-리팩토링
cloud0406 Dec 13, 2024
e758cf1
button 중복 코드 제거
cloud0406 Dec 13, 2024
80b51ca
📝[Docs] 임시 주석 처리
cloud0406 Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/components/button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ export default function Button({
themeColor = 'green-normal-01',
lightColor,
isSubmitting,
className,
...buttonProps
}: ButtonProps) {
const { disabled } = buttonProps;
const { disabled, className } = buttonProps;

const sizeClasses = SIZE[size];
const baseClasses = 'rounded-[12px] font-semibold cursor-pointer';
Expand All @@ -35,6 +34,10 @@ export default function Button({
: themeColor;

const variantClasses = (() => {
if (disabled) {
return `text-gray-dark-02 bg-gray-normal-02`;
}

switch (fillType) {
case 'solid':
return `text-gray-white ${COLOR_SCHEMES[resolvedColor]['bg']}`;
Expand Down
82 changes: 57 additions & 25 deletions src/components/card/Card.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,72 @@
import type { Meta, StoryObj } from '@storybook/react';
import Card from './Card';
import { mockMeeting } from './mock/mock';

const meta = {
title: 'Components/Card/Base',
title: 'Components/Card/Elements',
component: Card,
parameters: {
layout: 'centered',
},
argTypes: {
isCanceled: {
control: 'boolean',
description: '모임 취소 여부',
},
className: {
control: 'text',
description: '추가 스타일링을 위한 className',
},
},
tags: ['autodocs'],
} satisfies Meta<typeof Card>;

export default meta;
type Story = StoryObj<typeof Card>;

export const Default: Story = {
args: {
isCanceled: false,
},
render: (args) => (
<Card {...args}>
<Card.Image {...mockMeeting.imageInfo} />
<Card.Box>
<Card.Info {...mockMeeting.meetingInfo} />
<Card.Status {...mockMeeting.participationStatus} />
<Card.EndedOverlay onDelete={() => alert('삭제되었습니다')} />
</Card.Box>
</Card>
export const Box: Story = {
render: () => (
<Card.Box>
<p>Card Box Content</p>
</Card.Box>
),
};

export const Image: Story = {
render: () => (
<Card.Image
url="https://picsum.photos/400/300"
alt="샘플 이미지"
isLiked={false}
onLikeClick={() => alert('좋아요 클릭!')}
/>
),
};

export const Title: Story = {
render: () => <Card.Title>모임 제목 예시</Card.Title>,
};

export const Location: Story = {
render: () => <Card.Location>서울특별시 강남구</Card.Location>,
};

export const DateTime: Story = {
render: () => <Card.DateTime>2024.03.15 (금) 19:00</Card.DateTime>,
};

export const Overlay: Story = {
render: () => (
<div className="relative h-[200px] w-[336px]">
<Card.Overlay onDelete={() => alert('삭제 버튼 클릭!')} />
</div>
),
};

export const ImageWithLike: Story = {
render: () => (
<Card.Image
url="https://picsum.photos/400/300"
alt="좋아요된 이미지"
isLiked={true}
onLikeClick={() => alert('좋아요 클릭!')}
/>
),
};

export const BoxWithClick: Story = {
render: () => (
<Card.Box onClick={() => alert('박스 클릭!')}>
<p>클릭 가능한 Card Box</p>
</Card.Box>
),
};
144 changes: 0 additions & 144 deletions src/components/card/Card.test.tsx

This file was deleted.

Loading
Loading