Files
hanarang-dashboard/frontend/components/common/TaskBadge.tsx
narang-ai 230d3847ef feat(redesign-v2): 미니멀 터미널 UI 전체 리디자인
- 디자인 시스템: #151515 배경, 1px 보더 카드, CSS vars, mono 포인트
- GlobalStyle/theme.ts v2 (DESIGN-SYSTEM.md 기반)
- 공통 컴포넌트 (ui/base.tsx): LabelMeta, BracketValue, Card, TechBar, Timeline 등
- Sidebar: [대시] 브라켓 네비 + 모바일 하단 탭바 (767px)
- LayoutShell: SidebarContext 제거, 단순화
- 대시보드 (/): SYS 상태 카드 4개 + ONGOING PROJECTS + ACTIVITY FEED
- 활동 로그 (/activities): 로그 테이블 + 필터 + 검색 + 페이지네이션 (신규)
- 설정 (/settings): 4섹션 Toggle/Bracket Input 그리드
- 자매 노드 관리 (/sisters): 3열 수평 레이아웃 (INFO/GRAPH/SYNC)
- 자매 상세 (/sisters/[name]): 간소화 + 터미널 스타일
- 조직도 (/org): 터미널 카드 트리 구조 + 레벨 색상
- 프로젝트 목록 (/projects): 새 라우트
- 프로젝트 상세 (/projects/[id]): Phase Timeline + Audit Log + Checklist
- FE 14 routes build 성공
2026-04-04 13:10:57 +09:00

38 lines
1.4 KiB
TypeScript

'use client';
import React from 'react';
import styled from 'styled-components';
import { theme } from '@/styles/theme';
type TaskStatus = 'pending' | 'in_progress' | 'review' | 'done' | 'failed' | 'blocked' | 'escalated';
interface TaskBadgeProps {
status: TaskStatus;
}
const statusConfig: Record<TaskStatus, { label: string; color: string; bg: string }> = {
pending: { label: '대기', color: 'var(--text-secondary)', bg: 'rgba(139,148,158,0.1)' },
in_progress: { label: '진행중', color: '#2979FF', bg: 'rgba(41,121,255,0.12)' },
review: { label: '리뷰', color: '#FF9800', bg: 'rgba(255,152,0,0.12)' },
done: { label: '완료', color: '#00FF00', bg: 'rgba(0,230,118,0.12)' },
failed: { label: '실패', color: '#FF1744', bg: 'rgba(255,23,68,0.12)' },
blocked: { label: '블로킹', color: '#FF5722', bg: 'rgba(255,87,34,0.12)' },
escalated: { label: '에스컬레이션', color: '#E040FB', bg: 'rgba(224,64,251,0.12)' },
};
const Badge = styled.span<{ $color: string; $bg: string }>`
display: inline-block;
padding: 2px 8px;
border-radius: 4px;
font-size: 11px;
font-weight: 600;
color: ${({ $color }) => $color};
background: ${({ $bg }) => $bg};
white-space: nowrap;
`;
export default function TaskBadge({ status }: TaskBadgeProps) {
const cfg = statusConfig[status] ?? statusConfig.pending;
return <Badge $color={cfg.color} $bg={cfg.bg}>{cfg.label}</Badge>;
}