- 디자인 시스템: #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 성공
116 lines
2.3 KiB
TypeScript
116 lines
2.3 KiB
TypeScript
'use client';
|
|
|
|
import React from 'react';
|
|
import styled from 'styled-components';
|
|
import { theme } from '@/styles/theme';
|
|
|
|
interface ConfirmModalProps {
|
|
title: string;
|
|
message: string;
|
|
confirmLabel?: string;
|
|
danger?: boolean;
|
|
onConfirm: () => void;
|
|
onCancel: () => void;
|
|
}
|
|
|
|
const Overlay = styled.div`
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,0.6);
|
|
z-index: 300;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
`;
|
|
|
|
const Modal = styled.div`
|
|
background: #161b22;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 12px;
|
|
padding: 28px;
|
|
min-width: 320px;
|
|
max-width: 480px;
|
|
box-shadow: 0 20px 60px rgba(0,0,0,0.6);
|
|
`;
|
|
|
|
const Title = styled.h2`
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
margin-bottom: 10px;
|
|
`;
|
|
|
|
const Message = styled.p`
|
|
font-size: 14px;
|
|
color: var(--text-secondary);
|
|
line-height: 1.6;
|
|
margin-bottom: 24px;
|
|
`;
|
|
|
|
const Buttons = styled.div`
|
|
display: flex;
|
|
gap: 10px;
|
|
justify-content: flex-end;
|
|
`;
|
|
|
|
const Btn = styled.button<{ $danger?: boolean; $primary?: boolean }>`
|
|
padding: 8px 18px;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
border: 1px solid;
|
|
transition: all 0.15s;
|
|
|
|
${({ $danger }) =>
|
|
$danger &&
|
|
`
|
|
background: rgba(255,23,68,0.12);
|
|
border-color: rgba(255,23,68,0.4);
|
|
color: #FF1744;
|
|
&:hover { background: rgba(255,23,68,0.2); }
|
|
`}
|
|
|
|
${({ $primary }) =>
|
|
$primary &&
|
|
`
|
|
background: rgba(88,166,255,0.12);
|
|
border-color: rgba(88,166,255,0.4);
|
|
color: #58A6FF;
|
|
&:hover { background: rgba(88,166,255,0.2); }
|
|
`}
|
|
|
|
${({ $danger, $primary }) =>
|
|
!$danger && !$primary &&
|
|
`
|
|
background: transparent;
|
|
border-color: rgba(240,246,252,0.15);
|
|
color: #8B949E;
|
|
&:hover { background: rgba(240,246,252,0.06); color: #E6EDF3; }
|
|
`}
|
|
`;
|
|
|
|
export default function ConfirmModal({
|
|
title,
|
|
message,
|
|
confirmLabel = '확인',
|
|
danger,
|
|
onConfirm,
|
|
onCancel,
|
|
}: ConfirmModalProps) {
|
|
return (
|
|
<Overlay onClick={onCancel}>
|
|
<Modal onClick={(e) => e.stopPropagation()}>
|
|
<Title>{title}</Title>
|
|
<Message>{message}</Message>
|
|
<Buttons>
|
|
<Btn onClick={onCancel}>취소</Btn>
|
|
<Btn $danger={danger} $primary={!danger} onClick={onConfirm}>
|
|
{confirmLabel}
|
|
</Btn>
|
|
</Buttons>
|
|
</Modal>
|
|
</Overlay>
|
|
);
|
|
}
|