// RadiusContent.tsx — WING-OPS Radius 콘텐츠 (다크/라이트 테마 지원) import type { DesignTheme } from './designTheme'; // ---------- 데이터 타입 ---------- interface RadiusToken { name: string; value: string; px: number; isCustom?: boolean; } interface ComponentRadius { className: string; radius: string; components: string[]; } // ---------- Radius Token 데이터 ---------- const RADIUS_TOKENS: RadiusToken[] = [ { name: 'rounded-sm', value: '6px', px: 6, isCustom: true }, { name: 'rounded', value: '4px (0.25rem)', px: 4 }, { name: 'rounded-md', value: '10px', px: 10, isCustom: true }, { name: 'rounded-lg', value: '8px (0.5rem)', px: 8 }, { name: 'rounded-xl', value: '12px (0.75rem)', px: 12 }, { name: 'rounded-2xl', value: '16px (1rem)', px: 16 }, { name: 'rounded-full', value: '9999px', px: 9999 }, ]; // ---------- 컴포넌트 매핑 데이터 ---------- const COMPONENT_RADIUS: ComponentRadius[] = [ { className: 'rounded-sm (6px)', radius: '6px', components: ['.wing-btn', '.wing-input', '.wing-card-sm'] }, { className: 'rounded (4px)', radius: '4px', components: ['.wing-badge'] }, { className: 'rounded-md (10px)', radius: '10px', components: ['.wing-card', '.wing-section', '.wing-tab'] }, { className: 'rounded-lg (8px)', radius: '8px', components: ['.wing-tab-bar'] }, { className: 'rounded-xl (12px)', radius: '12px', components: ['.wing-modal'] }, ]; // ---------- Props ---------- interface RadiusContentProps { theme: DesignTheme; } // ---------- 컴포넌트 ---------- export const RadiusContent = ({ theme }: RadiusContentProps) => { const t = theme; const isDark = t.mode === 'dark'; return (
Radius는 컴포넌트 혹은 콘텐츠 모서리의 둥글기를 표현합니다.
Radius는 UI 구성 요소의 모서리를 둥글게 처리하여 부드럽고 현대적인 느낌을 제공합니다. 일관된 Radius 값은 브랜드 아이덴티티를 강화하고, 사용자 경험을 향상시키며, 다양한 화면과 컨텍스트에서 시각적 일관성을 유지하는 데 중요한 역할을 합니다.
rounded-sm(6px)과{' '}
rounded-md(10px)는 Tailwind 기본값을 오버라이드한 프로젝트 커스텀 값입니다.
wing.css 컴포넌트 클래스에 적용된 Radius 토큰입니다.