SPMS_WEB/react/src/components/ui/checkbox.tsx
SEAN fc9b0c0f75 feat: 프론트엔드 아키텍처 셋업 (#2)
- Vite 기본 템플릿 정리 및 index.html 수정
- guideline.html 기반 디자인 토큰 적용 (index.css)
- Feature-based 폴더 구조 (8개 feature 모듈)
- 18개 placeholder 페이지 + lazy loading 라우터
- 레이아웃 컴포넌트 (AppLayout, AppHeader, AppSidebar, AuthLayout)
- Zustand 스토어 (authStore, uiStore)
- API 계층 (Axios client, auth.api)
- 타입 정의, 유틸리티, 환경변수 설정
- ErrorBoundary, ProtectedRoute, PublicRoute

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 13:02:22 +09:00

33 lines
1.2 KiB
TypeScript

"use client"
import * as React from "react"
import { CheckIcon } from "lucide-react"
import { Checkbox as CheckboxPrimitive } from "radix-ui"
import { cn } from "@/lib/utils"
function Checkbox({
className,
...props
}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
return (
<CheckboxPrimitive.Root
data-slot="checkbox"
className={cn(
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
className
)}
{...props}
>
<CheckboxPrimitive.Indicator
data-slot="checkbox-indicator"
className="grid place-content-center text-current transition-none"
>
<CheckIcon className="size-3.5" />
</CheckboxPrimitive.Indicator>
</CheckboxPrimitive.Root>
)
}
export { Checkbox }