It is a React component library for toy projects.
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';
-
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.
๊ทธ์ธ ์์ธํ ์ฌ์ฉ๋ฒ์ ์คํ ๋ฆฌ๋ถ์ ํ์ธํด ์ฃผ์ธ์.