- 채점 기준표: 6 카테고리 36 항목 100점, 항목별 근거등급/통제/채점방식/howToCheck - 집계: 미검증 항목 분모 제외, llms.txt 항목 제외 - 뷰성형외과 실측 결과 + 핵심 발견 5 + 액션 7 + 하지 않을 것 5 - DiscoveryReportPage: INFINITH 디자인 토큰, 본문 +2pt, 판정 배지/우선순위 +4pt 볼드, keep-all - SeverityBadge className prop 추가 - Badge.tsx 복원 (PricingPage import 누락으로 빌드 깨져 있던 것) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
38 lines
936 B
TypeScript
38 lines
936 B
TypeScript
/**
|
|
* Badge — 가격표 등에서 쓰는 강조 배지.
|
|
* PricingPage가 import하던 컴포넌트가 저장소에 누락되어 빌드가 깨져 있어 복원 (2026-08-28).
|
|
*/
|
|
type BadgeVariant = 'popular' | 'new' | 'recommended';
|
|
type BadgeSize = 'sm' | 'md';
|
|
|
|
const LABEL: Record<BadgeVariant, string> = {
|
|
popular: 'Most Popular',
|
|
new: 'New',
|
|
recommended: 'Recommended',
|
|
};
|
|
|
|
const SIZE: Record<BadgeSize, string> = {
|
|
sm: 'text-[10px] px-2.5 py-0.5',
|
|
md: 'text-xs px-3 py-1',
|
|
};
|
|
|
|
export default function Badge({
|
|
variant = 'popular',
|
|
size = 'md',
|
|
label,
|
|
className = '',
|
|
}: {
|
|
variant?: BadgeVariant;
|
|
size?: BadgeSize;
|
|
label?: string;
|
|
className?: string;
|
|
}) {
|
|
return (
|
|
<span
|
|
className={`inline-flex items-center rounded-full font-semibold tracking-wide text-white bg-gradient-to-r from-[#4F1DA1] to-[#021341] ${SIZE[size]} ${className}`}
|
|
>
|
|
{label ?? LABEL[variant]}
|
|
</span>
|
|
);
|
|
}
|