From bee8a2c28ce442a05ba8c40e4080e48c48128b09 Mon Sep 17 00:00:00 2001 From: kangkibong Date: Fri, 4 Oct 2024 18:34:58 +0900 Subject: [PATCH] Update README.md --- README.md | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 459c645..277ecd0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,46 @@ # ๐Ÿช ๋‚ด๊ฐ€ ๋จน์€ ์ฟ ํ‚ค - 18์กฐ FE ## ๐Ÿ™‹โ€โ™‚๏ธ 4์ฃผ์ฐจ ์ฝ”๋“œ๋ฆฌ๋ทฐ ์งˆ๋ฌธ -- `Modal` ์ปดํฌ๋„ŒํŠธ๋ฅผ ๊ตฌํ˜„ํ•˜๋ฉด์„œ ํ…์ŠคํŠธ ๋ถ€๋ถ„๊ณผ ๋ฒ„ํŠผ ๋ถ€๋ถ„์— ๋“ค์–ด๊ฐˆ ๋‚ด์šฉ์€ ๊ฐœ๋ฐœํ•  ๋•Œ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋Š” ์‚ฌ๋žŒ์ด ์ž์œ ๋กญ๊ฒŒ ์ž‘์„ฑํ•˜์—ฌ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ๋„๋ก `textChildren`๊ณผ `buttonChildren`๋งŒ์œผ๋กœ ๊ตฌ์„ฑํ•˜์˜€๋Š”๋ฐ, ๋” ์ ํ•ฉํ•˜๊ฑฐ๋‚˜ ์ง€ํ–ฅํ•˜๋Š” ๋ฐฉ์‹์ด ์žˆ์„๊นŒ์š”? \ No newline at end of file + +- `Modal` ์ปดํฌ๋„ŒํŠธ๋ฅผ ๊ตฌํ˜„ํ•˜๋ฉด์„œ ํ…์ŠคํŠธ ๋ถ€๋ถ„๊ณผ ๋ฒ„ํŠผ ๋ถ€๋ถ„์— ๋“ค์–ด๊ฐˆ ๋‚ด์šฉ์€ ๊ฐœ๋ฐœํ•  ๋•Œ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋Š” ์‚ฌ๋žŒ์ด ์ž์œ ๋กญ๊ฒŒ ์ž‘์„ฑํ•˜์—ฌ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ๋„๋ก `textChildren`๊ณผ `buttonChildren`๋งŒ์œผ๋กœ ๊ตฌ์„ฑํ•˜์˜€๋Š”๋ฐ, ๋” ์ ํ•ฉํ•˜๊ฑฐ๋‚˜ ์ง€ํ–ฅํ•˜๋Š” ๋ฐฉ์‹์ด ์žˆ์„๊นŒ์š”? + +## ๐Ÿ™‹โ€โ™‚๏ธ 5์ฃผ์ฐจ ์ฝ”๋“œ๋ฆฌ๋ทฐ ์งˆ๋ฌธ + +- ํ•˜๋‚˜์˜ ํŽ˜์ด์ง€ ๋‚ด์—์„œ๋งŒ ์—ฌ๋Ÿฌ๋ฒˆ ์‚ฌ์šฉ๋˜๋Š” ๊ณตํ†ต ์ปดํฌ๋„ŒํŠธ์˜ ๊ฒฝ์šฐ, components/common ํด๋”์— ๊ณตํ†ต ์ปดํฌ๋„ŒํŠธ๋กœ ๋งŒ๋“ค์–ด ์ทจ๊ธ‰ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์€์ง€, ํ˜น์€ ํ•ด๋‹น ํŽ˜์ด์ง€ ์ฝ”๋“œ ํŒŒ์ผ์ด ์œ„์น˜ํ•œ ํด๋”์— ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋งŒ๋“ค๊ฑฐ๋‚˜ ํ•ด๋‹น ํŽ˜์ด์ง€ ์ฝ”๋“œ ํŒŒ์ผ ํ•˜๋‹จ์— ์ž‘์„ฑํ•˜๋Š” ๋“ฑ colocation ์›์น™์„ ์ ์šฉํ•ด์„œ ๊ฐ€๊นŒ์ด ์œ„์น˜์‹œํ‚ค๋Š” ๊ฒƒ์ด ์ข‹์„์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค. +- `Header` ์ปดํฌ๋„ŒํŠธ์—์„œ ๋‹ค๋ฅธ theme์„ ๊ฐ€์ง„ ๋ฒ„ํŠผ๋“ค์— ๊ณตํ†ต๋œ ์Šคํƒ€์ผ์„ ์ ์šฉํ•˜๋ฉด์„œ, ํŠน์ • ๋ฒ„ํŠผ์—๋งŒ ์ถ”๊ฐ€์ ์ธ ์Šคํƒ€์ผ์„ ์ฃผ๋Š” ์ž‘์—…์„ ํ–ˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜์™€ ๊ฐ™์ด ๊ฐ ๋ฒ„ํŠผ์— ๊ณตํ†ต์ ์œผ๋กœ ์ ์šฉ๋  ์Šคํƒ€์ผ์„ `commonButtonStyles`๋กœ ์ •์˜ํ•˜๊ณ , `theme=default`์ธ ๋ฒ„ํŠผ์—๋งŒ ์ถ”๊ฐ€ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ด๋ณด์•˜๋Š”๋ฐ, ์ œ๊ฐ€ ๊ตฌํ˜„ํ•œ ๋ฐฉ์‹๋ณด๋‹ค ๋” ๊ดœ์ฐฎ์€ ๋ฐฉ๋ฒ•์ด ์žˆ๋Š”์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค. + +```jsx +const commonButtonStyles = css` + white-space: nowrap; + border-radius: 4px; +`; + +``` + +``` + + + + +``` + +- ํƒœ๋ธ”๋ฆฟ(`768px`)๊ณผ ๋ชจ๋ฐ”์ผ(`480px`)์—์„œ ๋ฐ˜์‘ํ˜•์„ ๊ณ ๋ คํ•˜์—ฌ `breakpoints`๋ฅผ ์ •์˜ํ•˜์˜€๊ณ , ์ด๋ฅผ ๋ณด๋‹ค ๋ช…์‹œ์ ์œผ๋กœ ํ™œ์šฉํ•˜๊ธฐ ์œ„ํ•ด `responsiveStyles` ํ•จ์ˆ˜๋ฅผ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค. +๋ฉ˜ํ† ๋‹˜๊ป˜์„œ๋Š” ๋ณดํ†ต ๋ฐ˜์‘ํ˜• ์Šคํƒ€์ผ๋ง์„ ๊ตฌํ˜„ํ•  ๋•Œ ์–ด๋–ค ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜์‹œ๋‚˜์š”? +ํ˜น์‹œ ์ œ๊ฐ€ ์‚ฌ์šฉํ•œ `responsiveStyles` ํ•จ์ˆ˜๋ณด๋‹ค ํšจ์œจ์ ์ด๊ฑฐ๋‚˜ ์ฝ”๋“œ์˜ ๊ฐ€๋…์„ฑ์„ ๋†’์ผ ์ˆ˜ ์žˆ๋Š” ๋” ๋‚˜์€ ๋ฐฉ๋ฒ•์ด ์žˆ์„๊นŒ์š”? ๋ฉ˜ํ† ๋‹˜์ด ์ถ”์ฒœํ•˜๋Š” ๋ฐฉ๋ฒ•์ด๋‚˜ ์ผ๋ฐ˜์ ์œผ๋กœ ์‚ฌ์šฉ๋˜๋Š” best practice ๋˜ํ•œ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค. + +- ํ˜„์žฌ `Modal` ์ปดํฌ๋„ŒํŠธ๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ๋งˆ๋‹ค `useToggle` ์ปค์Šคํ…€ ํ›…์„ ํ•จ๊ป˜ ์‚ฌ์šฉํ•ด์•ผ ํ•ด์„œ, ๋ชจ๋‹ฌ์„ ์ œ์–ดํ•˜๊ธฐ ์œ„ํ•œ ์ฝ”๋“œ๊ฐ€ ํฉ์–ด์ ธ ์žˆ๋Š” ๋Š๋‚Œ์ž…๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ๋˜๋ฉด ๋ชจ๋‹ฌ ๊ด€๋ จ ๋กœ์ง์œผ๋กœ ์ธํ•ด์„œ ๋‹จ์ผ ์ฑ…์ž„ ์›์น™์— ์–ด๊ธ‹๋‚œ๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ค๊ณค ํ•ฉ๋‹ˆ๋‹ค. +๋ณด๋‹ค ๋‚˜์€ ๋ฐฉ์‹์œผ๋กœ `Modal` ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋™์ž‘์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ์„๊นŒ์š”? `useToggle`์ฒ˜๋Ÿผ ๋ชจ๋‹ฌ์„ ์ œ์–ดํ•˜๋Š” ๋กœ์ง์„ ๊ฐ„์†Œํ™”ํ•˜๊ณ , ๋ชจ๋‹ฌ ์ปดํฌ๋„ŒํŠธ ์ž์ฒด๊ฐ€ ์Šค์Šค๋กœ ์ƒํƒœ๋ฅผ ๊ด€๋ฆฌํ•˜๊ฑฐ๋‚˜ ์‰ฝ๊ฒŒ ์ œ์–ด ๊ฐ€๋Šฅํ•œ ํ˜•ํƒœ๋กœ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.