-
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.
Showing
14 changed files
with
219 additions
and
3 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,5 +1,9 @@ | ||
import Image from 'next/image' | ||
import GoogleLoginButton from '@/components/shared/GoogleLoginButton' | ||
|
||
export default function Home() { | ||
return <main className='text-white'>SPACE D 🪐 메인</main> | ||
return ( | ||
<main className="text-white"> | ||
<GoogleLoginButton /> | ||
</main> | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react' | ||
|
||
type LayoutProps = { | ||
children: React.ReactNode | ||
} | ||
export default function ProfileLayout({ children }: LayoutProps) { | ||
return ( | ||
<div className="pb-4 h-full"> | ||
<div className="h-[calc(100%-80px)]">{children}</div> | ||
</div> | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react' | ||
|
||
function Profile() { | ||
return <div className="text-onSurface-300">test</div> | ||
} | ||
|
||
export default Profile |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function SelectCard() { | ||
return <div>SelectCard</div> | ||
} |
45 changes: 45 additions & 0 deletions
45
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import JobGroup from '.' | ||
import JobGroupCard from '.' | ||
|
||
const meta: Meta<typeof JobGroup> = { | ||
title: 'components/Profile/JobGroupCard', | ||
component: JobGroupCard, | ||
tags: ['autodocs'], | ||
argTypes: { | ||
id: { | ||
description: '각 컴포넌트에 대한 ID를 추가합니다', | ||
}, | ||
name: { | ||
description: '개발자, 디자이너, 기타로 분류됩니다.', | ||
}, | ||
}, | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof JobGroup> | ||
|
||
export const Develop: Story = { | ||
args: { | ||
id: 1, | ||
name: '개발자', | ||
}, | ||
render: () => <JobGroupCard id={1} name={'개발자'} />, | ||
} | ||
|
||
export const Design: Story = { | ||
args: { | ||
id: 2, | ||
name: '디자이너', | ||
}, | ||
render: () => <JobGroupCard id={2} name={'디자이너'} />, | ||
} | ||
|
||
export const Etcetera: Story = { | ||
args: { | ||
id: 3, | ||
name: '기타', | ||
}, | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React, { useState } from 'react' | ||
import Image from 'next/image' | ||
import { JobGroup } from '@/types/profile' | ||
|
||
export default function JobGroupCard({ id, name }: JobGroup) { | ||
const [selected, setSelected] = useState(false) | ||
|
||
const handleClick = () => { | ||
setSelected(!selected) | ||
} | ||
|
||
return ( | ||
<div | ||
className={`flex p-4 bg-gray-800 rounded-2xl text-onSurface-300 ${ | ||
selected && | ||
'bg-primary-0 text-background border-solid border-[1.5px] border-primary-400' | ||
}`} | ||
onClick={handleClick} | ||
> | ||
<Image | ||
src={`/icons/job_group_0${id}.svg`} | ||
alt={`job_group_${id}.svg`} | ||
width={63} | ||
height={63} | ||
/> | ||
<p className="p-6 text-h2">{name}</p> | ||
</div> | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import ProfileChip from '.' | ||
import Chip from '.' | ||
|
||
const meta: Meta<typeof ProfileChip> = { | ||
title: 'components/Profile/Chip', | ||
component: ProfileChip, | ||
tags: ['autodocs'], | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof ProfileChip> | ||
|
||
export const Default: Story = { | ||
render: () => ( | ||
<div className="flex flex-col gap-2"> | ||
<Chip id={0} name="비공개" type="기업" /> | ||
</div> | ||
), | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React, { useState } from 'react' | ||
import { ProfileChip } from '@/types/profileChip' | ||
|
||
export default function Chip({ id, type, name }: ProfileChip) { | ||
const [selected, setSelected] = useState(false) | ||
|
||
const handleClick = () => { | ||
setSelected(!selected) | ||
console.log(`${type}: ${name}`) | ||
} | ||
|
||
return ( | ||
<div | ||
className={`w-fit px-5 py-2 rounded-[0.25rem] hover:cursor-pointer ${ | ||
selected | ||
? 'bg-primary-400 text-background' | ||
: 'border-solid border-[1.5px] border-outline text-onSurface-300' | ||
}`} | ||
key={id} | ||
onClick={handleClick} | ||
> | ||
{name} | ||
</div> | ||
) | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface JobGroup { | ||
id: number | ||
name: string | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface ProfileChip { | ||
id: number | ||
type?: '기업' | '경력' | ||
name: string | ||
} |