-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
design: storybook 및 기타 변동사항 수정
- Loading branch information
Showing
4 changed files
with
74 additions
and
13 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
import Image from 'next/image' | ||
|
||
export default function Loading() { | ||
return <div className="text-primary-400">loading..</div> | ||
return ( | ||
<div className="h-full bg-[#000] flex justify-center items-center"> | ||
<Image | ||
src={'/gif/loading.gif'} | ||
alt="loading.gif" | ||
width={100} | ||
height={100} | ||
/> | ||
</div> | ||
) | ||
} |
49 changes: 43 additions & 6 deletions
49
src/components/domain/profile/JobGroupCard/JobGroupCard.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,82 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import JobGroup from '.' | ||
import JobGroupCard from '.' | ||
import { useState } from 'react' | ||
|
||
const meta: Meta<typeof JobGroup> = { | ||
const meta: Meta<typeof JobGroupCard> = { | ||
title: 'components/Profile/JobGroupCard', | ||
component: JobGroupCard, | ||
tags: ['autodocs'], | ||
argTypes: { | ||
id: { | ||
description: '각 컴포넌트에 대한 ID를 추가합니다', | ||
control: 'number', | ||
}, | ||
name: { | ||
description: '개발자, 디자이너, 기타로 분류됩니다.', | ||
control: 'text', | ||
}, | ||
selected: { | ||
description: '카드가 선택된 상태를 나타냅니다.', | ||
control: 'boolean', | ||
}, | ||
onClick: { | ||
description: '카드를 클릭할 때 호출되는 함수입니다.', | ||
action: 'clicked', | ||
}, | ||
}, | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof JobGroup> | ||
type Story = StoryObj<typeof JobGroupCard> | ||
|
||
export const Develop: Story = { | ||
args: { | ||
id: 1, | ||
name: '개발자', | ||
selected: false, | ||
}, | ||
render: (args) => { | ||
const [select, setSelected] = useState(args.selected) | ||
|
||
const handleClick = () => { | ||
setSelected((prev) => !prev) | ||
} | ||
|
||
return <JobGroupCard {...args} selected={select} onClick={handleClick} /> | ||
}, | ||
render: () => <JobGroupCard id={1} name={'개발자'} />, | ||
} | ||
|
||
export const Design: Story = { | ||
args: { | ||
id: 2, | ||
name: '디자이너', | ||
selected: false, | ||
}, | ||
render: (args) => { | ||
const [select, setSelected] = useState(args.selected) | ||
|
||
const handleClick = () => { | ||
setSelected((prev) => !prev) | ||
} | ||
|
||
return <JobGroupCard {...args} selected={select} onClick={handleClick} /> | ||
}, | ||
render: () => <JobGroupCard id={2} name={'디자이너'} />, | ||
} | ||
|
||
export const Etcetera: Story = { | ||
args: { | ||
id: 3, | ||
name: '기타', | ||
selected: false, | ||
}, | ||
render: (args) => { | ||
const [select, setSelected] = useState(args.selected) | ||
|
||
const handleClick = () => { | ||
setSelected((prev) => !prev) | ||
} | ||
|
||
return <JobGroupCard {...args} selected={select} onClick={handleClick} /> | ||
}, | ||
render: () => <JobGroupCard id={3} name={'기타'} />, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters