@clovirtualfashion/components
κ°λ° νκ²½
ν¨ν€μ§ ꡬ쑰
src/
βββ components/ # μ»΄ν¬λνΈ λλ ν 리
β βββ button/ # λ²νΌ μ»΄ν¬λνΈ
β β βββ src
β β β βββ Button.styles.ts # λ²νΌ μ€νμΌ
β β β βββ Button.types.ts # λ²νΌ νμ
μ μ
β β β βββ Button.tsx # λ²νΌ μ»΄ν¬λνΈ κ΅¬ν
β β βββ index.ts # λ²νΌ μ»΄ν¬λνΈ λ΄λ³΄λ΄κΈ°
β β
β βββ {componentName}/ # {componentName} μ»΄ν¬λνΈ
β β βββ src
β β β βββ {componentName}.styles.ts # Component μ€νμΌ
β β β βββ {componentName}.types.ts # Component νμ
β β β βββ {componentName}.tsx # Component ꡬν
β β βββ index.ts # {componentName} κ΄λ ¨ νμΌλ€
β βββ index.ts # μ 체 μ»΄ν¬λνΈ λ΄λ³΄λ΄κΈ°
β
βββ styles/ # μ€νμΌ κ΄λ ¨ νμΌ
β βββ global.css # μ μ μ€νμΌ (tailwindcss)
β
βββ vite-env.d.ts # Vite νκ²½ μ μ νμΌ
βββ vite.config.ts # Vite μ€μ νμΌ
βββ tailwind.config.ts # tailwindcss μ€μ νμΌ
βββ index.ts # λΌμ΄λΈλ¬λ¦¬ μ§μ
μ
β οΈ μ£Όμ μ¬ν
μ€μ: Tailwindcss 4λΆν° λ³κ²½λ μ¬νμΌλ‘, λΉλ κ³Όμ μμ μ¬μ©νμ§ μλ classNameμ μλμΌλ‘ μ κ±°λ©λλ€.
νΉμ ν΄λμ€κ° μ κ±°λμ§ μκ³ μ μ§λλλ‘ νλ €λ©΄ λ°λμ safelist-tailwind.txt νμΌμ λͺ
μν΄μΌ ν©λλ€.
ν¨ν΄ νμ(μ: bg-*)μ νμ©λμ§ μμΌλ©°, κ° ν΄λμ€λ₯Ό κ°λ³μ μΌλ‘ λͺ
μν΄μΌ ν©λλ€.
λͺ
λ Ήμ΄
λΉλ
#
yarn @components build
# or
# Aurora Component packages
yarn build
μ»΄ν¬λνΈ μμ±
yarn @components component:create
yarn component:create
μ»΄ν¬λνΈ κ²μ¬
yarn @components validate:components
yarn validate:components
μ¬μ© λ°©λ²
import "@clovirtualfashion/components/styles";
import Button from '@clovirtualfashion/components/button'
import { Button } from "@clovirtualfashion/components"
<Button label="λ²νΌ ν
μ€νΈ" />
μ»΄ν¬λνΈ κ΅¬μ‘° κ²μ¬
μ»΄ν¬λνΈλ μ ννλ ꡬ쑰λ₯Ό μ μ§ν΄μΌ ν©λλ€. λ€μ λͺ
λ Ήμ΄λ₯Ό μ¬μ©νμ¬ λͺ¨λ μ»΄ν¬λνΈμ ꡬ쑰λ₯Ό κ²μ¬ν μ μμ΅λλ€:
yarn check:structure
μ¬λ°λ₯Έ ꡬ쑰λ λ€μκ³Ό κ°μ΅λλ€:
src/components/
βββ {componentName}/ # {componentName} μ»΄ν¬λνΈ (μλ¬Έμ)
βββ index.ts # μ»΄ν¬λνΈ μ§μ
μ
βββ src/
βββ {ComponentName}.tsx # μ»΄ν¬λνΈ κ΅¬ν (λλ¬Έμ μμ)
βββ {ComponentName}.styles.ts # μ»΄ν¬λνΈ μ€νμΌ
βββ {ComponentName}.types.ts # μ»΄ν¬λνΈ νμ