Next.js 개발 가이드/03. 퍼블 가이드
Button UI Button은 variant가 많고, Tailwind CSS는 nested selector를 지양함. 그러므로 다음과 같이 React component로 구현한다. 설치 $ pnpm add tailwind-merge clsx class-variance-authority 3가지를 설치해주고, 가이드 2-3을 참조하여 src/lib/utils.ts를 입력한다. Button library 예시 src/components/ui/button.tsx import { VariantProps, cva } from 'class-variance-authority'; import { ComponentProps } from 'react'; import { cn } from '@/lib/utils'; cons..
2023. 12. 17. 17:16 / Tech김백엔드