Skip to content

HyeokjaeLee/pastime-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

header

Node.js Pnpm React Typescript SCSS CSS_Modules Vite

It is a React component library for toy projects.

๐Ÿ“š How to use

Install package

npm i @hyeokjaelee/pastime-ui

Import style

After installing the package, import the style file in your React based app.

ํŒจํ‚ค์ง€ ์„ค์น˜ ํ›„ React ๊ธฐ๋ฐ˜ ์•ฑ์—์„œ style ํŒŒ์ผ์„ import ํ•ด์ค๋‹ˆ๋‹ค.

//ex: main.tsx (React), _app.tsx (Next.js)
import '@hyeokjaelee/pastime-ui/style.css';

๐Ÿงฉ Features

  • Components that receive user input can render at the component level without affecting the external state value by using their internal state value.

    ์‚ฌ์šฉ์ž์˜ ์ž…๋ ฅ์„ ๋ฐ›๋Š” ์ปดํฌ๋„ŒํŠธ๋“ค์€ ๋‚ด๋ถ€ ์ƒํƒœ๊ฐ’์„ ์ด์šฉํ•ด ์™ธ๋ถ€ ์ƒํƒœ๊ฐ’์— ์˜ํ–ฅ์„ ์ฃผ์ง€ ์•Š๊ณ  ์ปดํฌ๋„ŒํŠธ ๋‹จ์œ„์˜ ๋ Œ๋”๋ง์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

  • Components that take user input support convenient HOCs and hooks like validationObserver and useValidation for intrinsic validation. Similarly, since these features do not affect external state values, re-rendering can be minimized.

    ์‚ฌ์šฉ์ž์˜ ์ž…๋ ฅ์„ ๋ฐ›๋Š” ์ปดํฌ๋„ŒํŠธ๋“ค์€ ์ž์ฒด์ ์œผ๋กœ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ์™€ ์ด๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋Š” validationObserver, useValidation๋“ฑ์˜ ํŽธ์˜์„ฑ HOC, hook์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ํ•ด๋‹น ๊ธฐ๋Šฅ๋“ค์€ ์™ธ๋ถ€ ์ƒํƒœ๊ฐ’์— ์˜ํ–ฅ์„ ์ฃผ์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ์žฌ๋ Œ๋”๋ง์„ ์ตœ์†Œํ™” ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • It supports dark mode. By default, it follows the device value, and you can change it with the class value of the html tag.

    ๋‹คํฌ๋ชจ๋“œ๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ๋ณธ์ ์œผ๋กœ ๋””๋ฐ”์ด์Šค ๊ฐ’์„ ๋”ฐ๋ฅด๋ฉฐ html ํƒœ๊ทธ์˜ class๊ฐ’์œผ๋กœ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    ex: <html lang="en" class="dark"> or <html lang="en" class="light">.

For more detailed usage, please check the Storybook.

๊ทธ์™ธ ์ž์„ธํ•œ ์‚ฌ์šฉ๋ฒ•์€ ์Šคํ† ๋ฆฌ๋ถ์„ ํ™•์ธํ•ด ์ฃผ์„ธ์š”.

npm