/cds

🧊 μ°¨κ°€μš΄ λ””μžμΈ μ‹œμŠ€ν…œ

Primary LanguageTypeScriptMIT LicenseMIT

🧊 @cwhw/cds

μ°¨κ°€μš΄ λ””μžμΈ μ‹œμŠ€ν…œ (CDS, Cold Design System) 은 React μ»΄ν¬λ„ŒνŠΈ λΌμ΄λΈŒλŸ¬λ¦¬μž…λ‹ˆλ‹€.

일관적인 UI λ””μžμΈκ³Ό 접근성을 κ³ λ €ν•œ μ‚¬μš©μž μΈν„°λž™μ…˜μ„ μ œκ³΅ν•©λ‹ˆλ‹€.

Storybook λ¬Έμ„œ μ—μ„œ μ œκ³΅ν•˜λŠ” μ»΄ν¬λ„ŒνŠΈμ˜ μ’…λ₯˜μ™€ μš©λ‘€λ₯Ό 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.

Installation

npm install @chwh/cds
yarn add @chwh/cds

Usage

⚠️ μ‚¬μš©μ„ μœ„ν•΄ μƒμœ„ μ»΄ν¬λ„ŒνŠΈλ₯Ό CdsProvider둜 감싸야 ν•©λ‹ˆλ‹€.

const App = () => {
  return (
    <CdsProvider>
      // ... your components
    </CdsProvider>
  );
};

πŸ’… μ•„λž˜ μΈν„°νŽ˜μ΄μŠ€ 쀑 일뢀λ₯Ό μž¬μ •μ˜ν•œ 객체λ₯Ό CdsProvider의 themeColor props둜 전달해 ν…Œλ§ˆ 컬러λ₯Ό λ³€κ²½ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

type ColorSet = {
  primary: Property.Color;
  primaryLight: Property.Color;
  primaryDark: Property.Color;

  alert: Property.Color;
  info: Property.Color;
  success: Property.Color;
  warning: Property.Color;
  error: Property.Color;

  black: Property.Color;
  white: Property.Color;
  offWhite: Property.Color;
  background: Property.Color;
  gray100: Property.Color;
  gray200: Property.Color;
  gray300: Property.Color;
  gray400: Property.Color;
};

Contributors

@prayinforrain @iyu88 @se030 @leesunmin1231 @dohun31