Skip to content

Commit

Permalink
Merge pull request #14 from kakao-tech-campus-2nd-step3/Master
Browse files Browse the repository at this point in the history
5์ฃผ์ฐจ ์ฝ”๋“œ๋ฆฌ๋ทฐ PR
  • Loading branch information
JunilHwang authored Oct 8, 2024
2 parents 50259a6 + bee8a2c commit 6e952be
Show file tree
Hide file tree
Showing 79 changed files with 2,634 additions and 52 deletions.
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
npx lint-staged
npx lint-staged
10 changes: 9 additions & 1 deletion .storybook/preview.ts โ†’ .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from 'react';
import type { Preview } from '@storybook/react';
import AppProviders from '../src/components/providers/index.provider';

const preview: Preview = {
parameters: {
Expand All @@ -9,8 +11,14 @@ const preview: Preview = {
},
},
},

tags: ['autodocs'],
decorators: [
(Story) => (
<AppProviders>
<Story />
</AppProviders>
),
],
};

export default preview;
55 changes: 46 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,46 @@
# Team18_FE
18์กฐ ํ”„๋ก ํŠธ์—”๋“œ

### ์ฝ”๋“œ๋ฆฌ๋ทฐ ์งˆ๋ฌธ
**Week3**
- ํ˜„์žฌ vite๋กœ ํ”„๋กœ์ ํŠธ ์„ธํŒ…์„ ๋งˆ์ณค๋Š”๋ฐ, ๋” ์ถ”์ฒœํ•ด์ฃผ์‹ค ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋‚˜ ํ”„๋ ˆ์ž„์›Œํฌ ๋“ฑ ์ด ์žˆ์„๊นŒ์š”?
- ํ˜‘์—…์„ ํ•˜๋ฉด์„œ ์•Œ๋ฉด ์ข‹์€ ์‚ฌ์†Œํ•œ ํŒ์ด ์žˆ์„๊นŒ์š”?
- ํ˜„์žฌ ํŒ€์›๋“ค๊ฐ„ ์„ค์ •ํ•œ ํ”„๋กœ์ ํŠธ ์„ธํŒ…์€ ์•„๋ž˜ ๋…ธ์…˜๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์กฐ์–ธํ•ด์ฃผ์‹ค ๋ถ€๋ถ„์ด ์žˆ๋‚˜์š”?
https://kibong.notion.site/11100da872ea4854bf0f91908f029037?pvs=4
# ๐Ÿช ๋‚ด๊ฐ€ ๋จน์€ ์ฟ ํ‚ค - 18์กฐ FE

## ๐Ÿ™‹โ€โ™‚๏ธ 4์ฃผ์ฐจ ์ฝ”๋“œ๋ฆฌ๋ทฐ ์งˆ๋ฌธ

- `Modal` ์ปดํฌ๋„ŒํŠธ๋ฅผ ๊ตฌํ˜„ํ•˜๋ฉด์„œ ํ…์ŠคํŠธ ๋ถ€๋ถ„๊ณผ ๋ฒ„ํŠผ ๋ถ€๋ถ„์— ๋“ค์–ด๊ฐˆ ๋‚ด์šฉ์€ ๊ฐœ๋ฐœํ•  ๋•Œ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋Š” ์‚ฌ๋žŒ์ด ์ž์œ ๋กญ๊ฒŒ ์ž‘์„ฑํ•˜์—ฌ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ๋„๋ก `textChildren`๊ณผ `buttonChildren`๋งŒ์œผ๋กœ ๊ตฌ์„ฑํ•˜์˜€๋Š”๋ฐ, ๋” ์ ํ•ฉํ•˜๊ฑฐ๋‚˜ ์ง€ํ–ฅํ•˜๋Š” ๋ฐฉ์‹์ด ์žˆ์„๊นŒ์š”?

## ๐Ÿ™‹โ€โ™‚๏ธ 5์ฃผ์ฐจ ์ฝ”๋“œ๋ฆฌ๋ทฐ ์งˆ๋ฌธ

- ํ•˜๋‚˜์˜ ํŽ˜์ด์ง€ ๋‚ด์—์„œ๋งŒ ์—ฌ๋Ÿฌ๋ฒˆ ์‚ฌ์šฉ๋˜๋Š” ๊ณตํ†ต ์ปดํฌ๋„ŒํŠธ์˜ ๊ฒฝ์šฐ, components/common ํด๋”์— ๊ณตํ†ต ์ปดํฌ๋„ŒํŠธ๋กœ ๋งŒ๋“ค์–ด ์ทจ๊ธ‰ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์€์ง€, ํ˜น์€ ํ•ด๋‹น ํŽ˜์ด์ง€ ์ฝ”๋“œ ํŒŒ์ผ์ด ์œ„์น˜ํ•œ ํด๋”์— ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋งŒ๋“ค๊ฑฐ๋‚˜ ํ•ด๋‹น ํŽ˜์ด์ง€ ์ฝ”๋“œ ํŒŒ์ผ ํ•˜๋‹จ์— ์ž‘์„ฑํ•˜๋Š” ๋“ฑ colocation ์›์น™์„ ์ ์šฉํ•ด์„œ ๊ฐ€๊นŒ์ด ์œ„์น˜์‹œํ‚ค๋Š” ๊ฒƒ์ด ์ข‹์„์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.
- `Header` ์ปดํฌ๋„ŒํŠธ์—์„œ ๋‹ค๋ฅธ theme์„ ๊ฐ€์ง„ ๋ฒ„ํŠผ๋“ค์— ๊ณตํ†ต๋œ ์Šคํƒ€์ผ์„ ์ ์šฉํ•˜๋ฉด์„œ, ํŠน์ • ๋ฒ„ํŠผ์—๋งŒ ์ถ”๊ฐ€์ ์ธ ์Šคํƒ€์ผ์„ ์ฃผ๋Š” ์ž‘์—…์„ ํ–ˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜์™€ ๊ฐ™์ด ๊ฐ ๋ฒ„ํŠผ์— ๊ณตํ†ต์ ์œผ๋กœ ์ ์šฉ๋  ์Šคํƒ€์ผ์„ `commonButtonStyles`๋กœ ์ •์˜ํ•˜๊ณ , `theme=default`์ธ ๋ฒ„ํŠผ์—๋งŒ ์ถ”๊ฐ€ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ด๋ณด์•˜๋Š”๋ฐ, ์ œ๊ฐ€ ๊ตฌํ˜„ํ•œ ๋ฐฉ์‹๋ณด๋‹ค ๋” ๊ดœ์ฐฎ์€ ๋ฐฉ๋ฒ•์ด ์žˆ๋Š”์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.

```jsx
const commonButtonStyles = css`
white-space: nowrap;
border-radius: 4px;
`;

```

```
<Button theme="outlined" css={[commonButtonStyles]}>
์ฑ„์šฉ๊ณต๊ณ  ๋“ฑ๋ก
</Button>
<Button theme="textbutton" css={[commonButtonStyles]}>
๋‹‰๋„ค์ž„
</Button>
<Button
css={[
commonButtonStyles,
css`
background-color: #0a65cc;
color: #fff;
`,
]}
>
๋กœ๊ทธ์•„์›ƒ
</Button>
```

- ํƒœ๋ธ”๋ฆฟ(`768px`)๊ณผ ๋ชจ๋ฐ”์ผ(`480px`)์—์„œ ๋ฐ˜์‘ํ˜•์„ ๊ณ ๋ คํ•˜์—ฌ `breakpoints`๋ฅผ ์ •์˜ํ•˜์˜€๊ณ , ์ด๋ฅผ ๋ณด๋‹ค ๋ช…์‹œ์ ์œผ๋กœ ํ™œ์šฉํ•˜๊ธฐ ์œ„ํ•ด `responsiveStyles` ํ•จ์ˆ˜๋ฅผ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค.
๋ฉ˜ํ† ๋‹˜๊ป˜์„œ๋Š” ๋ณดํ†ต ๋ฐ˜์‘ํ˜• ์Šคํƒ€์ผ๋ง์„ ๊ตฌํ˜„ํ•  ๋•Œ ์–ด๋–ค ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜์‹œ๋‚˜์š”?
ํ˜น์‹œ ์ œ๊ฐ€ ์‚ฌ์šฉํ•œ `responsiveStyles` ํ•จ์ˆ˜๋ณด๋‹ค ํšจ์œจ์ ์ด๊ฑฐ๋‚˜ ์ฝ”๋“œ์˜ ๊ฐ€๋…์„ฑ์„ ๋†’์ผ ์ˆ˜ ์žˆ๋Š” ๋” ๋‚˜์€ ๋ฐฉ๋ฒ•์ด ์žˆ์„๊นŒ์š”? ๋ฉ˜ํ† ๋‹˜์ด ์ถ”์ฒœํ•˜๋Š” ๋ฐฉ๋ฒ•์ด๋‚˜ ์ผ๋ฐ˜์ ์œผ๋กœ ์‚ฌ์šฉ๋˜๋Š” best practice ๋˜ํ•œ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.

- ํ˜„์žฌ `Modal` ์ปดํฌ๋„ŒํŠธ๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ๋งˆ๋‹ค `useToggle` ์ปค์Šคํ…€ ํ›…์„ ํ•จ๊ป˜ ์‚ฌ์šฉํ•ด์•ผ ํ•ด์„œ, ๋ชจ๋‹ฌ์„ ์ œ์–ดํ•˜๊ธฐ ์œ„ํ•œ ์ฝ”๋“œ๊ฐ€ ํฉ์–ด์ ธ ์žˆ๋Š” ๋Š๋‚Œ์ž…๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ๋˜๋ฉด ๋ชจ๋‹ฌ ๊ด€๋ จ ๋กœ์ง์œผ๋กœ ์ธํ•ด์„œ ๋‹จ์ผ ์ฑ…์ž„ ์›์น™์— ์–ด๊ธ‹๋‚œ๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ค๊ณค ํ•ฉ๋‹ˆ๋‹ค.
๋ณด๋‹ค ๋‚˜์€ ๋ฐฉ์‹์œผ๋กœ `Modal` ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋™์ž‘์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ์„๊นŒ์š”? `useToggle`์ฒ˜๋Ÿผ ๋ชจ๋‹ฌ์„ ์ œ์–ดํ•˜๋Š” ๋กœ์ง์„ ๊ฐ„์†Œํ™”ํ•˜๊ณ , ๋ชจ๋‹ฌ ์ปดํฌ๋„ŒํŠธ ์ž์ฒด๊ฐ€ ์Šค์Šค๋กœ ์ƒํƒœ๋ฅผ ๊ด€๋ฆฌํ•˜๊ฑฐ๋‚˜ ์‰ฝ๊ฒŒ ์ œ์–ด ๊ฐ€๋Šฅํ•œ ํ˜•ํƒœ๋กœ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.
Loading

0 comments on commit 6e952be

Please sign in to comment.