style: 切换为现代 SaaS Dashboard 风格(Linear/Vercel/Notion 风)
- 调色板:zinc 中性色 + 冷静蓝色(#3b82f6)+ 卡片阴影 token - Sidebar:紧凑 60 宽度,加入顶部搜索框,分组导航,圆角 8px - 卡片:rounded-2xl + shadow-sm/md,留白节奏统一 - 表格:圆角卡片包裹,灰色表头小写大写字母 tracking - 表单:h-9 输入框,圆角 8px,focus ring 用半透明蓝 - 按钮分级:实心蓝(主操作)/ 边框白底(次操作)/ 暗黑实心(对比强调) - 状态徽章:ring-1 inset 内边框,色板更柔和 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,55 +12,41 @@ interface ProductWithCount {
|
||||
|
||||
interface Props {
|
||||
product: ProductWithCount;
|
||||
index: number;
|
||||
onClick: (id: string) => void;
|
||||
}
|
||||
|
||||
export function ProductCard({ product, index, onClick }: Props) {
|
||||
export function ProductCard({ product, onClick }: Props) {
|
||||
const reqCount = product._count?.requirements ?? 0;
|
||||
const projCount = product._count?.projects ?? 0;
|
||||
|
||||
return (
|
||||
<article
|
||||
<div
|
||||
onClick={() => onClick(product.id)}
|
||||
style={{ animationDelay: `${index * 60}ms` }}
|
||||
className="group animate-fade-up relative cursor-pointer overflow-hidden rounded-xl border border-[var(--line)] bg-[var(--bg-elevated)] p-6 transition-all duration-300 hover:-translate-y-0.5 hover:border-[var(--ink)] hover:shadow-[0_12px_32px_-12px_rgba(26,24,20,0.18)]"
|
||||
className="group cursor-pointer rounded-2xl border border-[var(--line)] bg-[var(--bg-card)] p-5 transition-all hover:border-[var(--ink-muted)] hover:shadow-[var(--shadow-md)]"
|
||||
>
|
||||
<div className="flex items-start justify-between">
|
||||
<span className="font-mono text-[10px] tabular-nums uppercase tracking-[0.18em] text-[var(--ink-muted)]">
|
||||
№ {String(index + 1).padStart(3, '0')}
|
||||
</span>
|
||||
<Package className="h-4 w-4 text-[var(--ink-muted)] transition-colors group-hover:text-[var(--accent)]" strokeWidth={1.75} />
|
||||
</div>
|
||||
|
||||
<h3 className="mt-6 font-display text-[26px] font-medium leading-[1.15] tracking-tight text-[var(--ink)]">
|
||||
{product.name}
|
||||
</h3>
|
||||
|
||||
{product.description ? (
|
||||
<p className="mt-2 line-clamp-2 text-[13px] leading-relaxed text-[var(--ink-soft)]">
|
||||
{product.description}
|
||||
</p>
|
||||
) : (
|
||||
<p className="mt-2 text-[13px] italic text-[var(--ink-muted)]">暂无描述</p>
|
||||
)}
|
||||
|
||||
<div className="mt-8 flex items-end justify-between border-t border-[var(--line-soft)] pt-4">
|
||||
<div className="flex gap-6">
|
||||
<div>
|
||||
<p className="font-display text-2xl font-semibold tabular-nums text-[var(--ink)]">{reqCount}</p>
|
||||
<p className="mt-0.5 font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--ink-muted)]">需求</p>
|
||||
</div>
|
||||
<div className="h-10 w-px bg-[var(--line-soft)]" />
|
||||
<div>
|
||||
<p className="font-display text-2xl font-semibold tabular-nums text-[var(--ink)]">{projCount}</p>
|
||||
<p className="mt-0.5 font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--ink-muted)]">项目</p>
|
||||
</div>
|
||||
<div className="mb-4 flex items-start gap-3">
|
||||
<div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-[var(--accent-soft)]">
|
||||
<Package className="h-[18px] w-[18px] text-[var(--accent-hover)]" strokeWidth={1.75} />
|
||||
</div>
|
||||
<div className="min-w-0 flex-1">
|
||||
<h3 className="truncate text-[14px] font-semibold text-[var(--ink)]">{product.name}</h3>
|
||||
<p className="mt-1 line-clamp-2 text-[12.5px] leading-relaxed text-[var(--ink-muted)]">
|
||||
{product.description || '暂无描述'}
|
||||
</p>
|
||||
</div>
|
||||
<span className="font-mono text-[11px] text-[var(--ink-muted)] opacity-0 transition-opacity group-hover:opacity-100">
|
||||
→
|
||||
</span>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<div className="flex items-center gap-4 border-t border-[var(--line-soft)] pt-3">
|
||||
<div className="flex items-baseline gap-1">
|
||||
<span className="text-[13px] font-semibold tabular-nums text-[var(--ink)]">{reqCount}</span>
|
||||
<span className="text-[11px] text-[var(--ink-muted)]">需求</span>
|
||||
</div>
|
||||
<div className="h-3 w-px bg-[var(--line)]" />
|
||||
<div className="flex items-baseline gap-1">
|
||||
<span className="text-[13px] font-semibold tabular-nums text-[var(--ink)]">{projCount}</span>
|
||||
<span className="text-[11px] text-[var(--ink-muted)]">项目</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,21 +19,21 @@ export function ProductForm({ initialData, onSubmit, onCancel }: Props) {
|
||||
};
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit} className="space-y-5">
|
||||
<form onSubmit={handleSubmit} className="space-y-4">
|
||||
<div>
|
||||
<label className="font-mono text-[10px] uppercase tracking-[0.2em] text-[var(--ink-muted)]">
|
||||
产品名称
|
||||
<label className="mb-1.5 block text-[12px] font-medium text-[var(--ink-soft)]">
|
||||
产品名称<span className="ml-0.5 text-red-500">*</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
placeholder="例如:FTB 智能项目管理"
|
||||
className="mt-2 block w-full border-0 border-b border-[var(--line)] bg-transparent pb-2 font-display text-2xl text-[var(--ink)] placeholder:font-display placeholder:text-[var(--ink-muted)] focus:border-[var(--accent)] focus:outline-none"
|
||||
placeholder="输入产品名称"
|
||||
className="h-9 w-full rounded-lg border border-[var(--line)] bg-[var(--bg-card)] px-3 text-[13px] text-[var(--ink)] placeholder:text-[var(--ink-muted)] focus:border-[var(--accent)] focus:outline-none focus:ring-2 focus:ring-[var(--accent-ring)]"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="font-mono text-[10px] uppercase tracking-[0.2em] text-[var(--ink-muted)]">
|
||||
<label className="mb-1.5 block text-[12px] font-medium text-[var(--ink-soft)]">
|
||||
描述
|
||||
</label>
|
||||
<textarea
|
||||
@@ -41,22 +41,22 @@ export function ProductForm({ initialData, onSubmit, onCancel }: Props) {
|
||||
onChange={(e) => setDescription(e.target.value)}
|
||||
rows={3}
|
||||
placeholder="一句话讲清楚这个产品做什么"
|
||||
className="mt-2 block w-full resize-none border-0 border-b border-[var(--line)] bg-transparent pb-2 text-[14px] leading-relaxed text-[var(--ink-soft)] placeholder:text-[var(--ink-muted)] focus:border-[var(--accent)] focus:outline-none"
|
||||
className="w-full resize-none rounded-lg border border-[var(--line)] bg-[var(--bg-card)] px-3 py-2 text-[13px] leading-relaxed text-[var(--ink)] placeholder:text-[var(--ink-muted)] focus:border-[var(--accent)] focus:outline-none focus:ring-2 focus:ring-[var(--accent-ring)]"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex justify-end gap-2 pt-2">
|
||||
<button
|
||||
type="button"
|
||||
onClick={onCancel}
|
||||
className="rounded-md px-4 py-2 text-[13px] text-[var(--ink-soft)] hover:bg-[var(--line-soft)]"
|
||||
className="h-8 rounded-lg border border-[var(--line)] bg-[var(--bg-card)] px-3 text-[13px] text-[var(--ink-soft)] hover:bg-[var(--bg-subtle)] hover:text-[var(--ink)]"
|
||||
>
|
||||
取消
|
||||
</button>
|
||||
<button
|
||||
type="submit"
|
||||
className="rounded-md bg-[var(--ink)] px-5 py-2 text-[13px] font-medium text-[var(--bg)] transition-colors hover:bg-[var(--accent)]"
|
||||
className="h-8 rounded-lg bg-[var(--accent)] px-4 text-[13px] font-medium text-white shadow-[var(--shadow-sm)] hover:bg-[var(--accent-hover)]"
|
||||
>
|
||||
{initialData ? '保存修改' : '创建产品'}
|
||||
{initialData ? '保存' : '创建'}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -21,36 +21,27 @@ export function RequirementForm({ initialData, onSubmit, onCancel }: Props) {
|
||||
};
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit} className="space-y-5">
|
||||
<div>
|
||||
<label className="font-mono text-[10px] uppercase tracking-[0.2em] text-[var(--ink-muted)]">
|
||||
需求标题
|
||||
</label>
|
||||
<form onSubmit={handleSubmit} className="space-y-4">
|
||||
<Field label="标题" required>
|
||||
<input
|
||||
type="text"
|
||||
value={title}
|
||||
onChange={(e) => setTitle(e.target.value)}
|
||||
placeholder="一句话描述需求"
|
||||
className="mt-2 block w-full border-0 border-b border-[var(--line)] bg-transparent pb-2 font-display text-xl text-[var(--ink)] placeholder:font-display placeholder:text-[var(--ink-muted)] focus:border-[var(--accent)] focus:outline-none"
|
||||
className="h-9 w-full rounded-lg border border-[var(--line)] bg-[var(--bg-card)] px-3 text-[13px] text-[var(--ink)] placeholder:text-[var(--ink-muted)] focus:border-[var(--accent)] focus:outline-none focus:ring-2 focus:ring-[var(--accent-ring)]"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="font-mono text-[10px] uppercase tracking-[0.2em] text-[var(--ink-muted)]">
|
||||
描述
|
||||
</label>
|
||||
</Field>
|
||||
<Field label="描述">
|
||||
<textarea
|
||||
value={description}
|
||||
onChange={(e) => setDescription(e.target.value)}
|
||||
rows={4}
|
||||
placeholder="详细说明需求背景、目标、验收标准"
|
||||
className="mt-2 block w-full resize-none border-0 border-b border-[var(--line)] bg-transparent pb-2 text-[14px] leading-relaxed text-[var(--ink-soft)] placeholder:text-[var(--ink-muted)] focus:border-[var(--accent)] focus:outline-none"
|
||||
className="w-full resize-none rounded-lg border border-[var(--line)] bg-[var(--bg-card)] px-3 py-2 text-[13px] leading-relaxed text-[var(--ink)] placeholder:text-[var(--ink-muted)] focus:border-[var(--accent)] focus:outline-none focus:ring-2 focus:ring-[var(--accent-ring)]"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="font-mono text-[10px] uppercase tracking-[0.2em] text-[var(--ink-muted)]">
|
||||
优先级
|
||||
</label>
|
||||
<div className="mt-2 flex gap-1.5">
|
||||
</Field>
|
||||
<Field label="优先级">
|
||||
<div className="flex gap-1">
|
||||
{Object.entries(PRIORITY_LABEL).map(([value, label]) => {
|
||||
const v = Number(value);
|
||||
const active = priority === v;
|
||||
@@ -59,10 +50,10 @@ export function RequirementForm({ initialData, onSubmit, onCancel }: Props) {
|
||||
key={value}
|
||||
type="button"
|
||||
onClick={() => setPriority(v)}
|
||||
className={`rounded-full px-3 py-1.5 text-[12px] transition-all ${
|
||||
className={`h-7 rounded-md px-2.5 text-[12.5px] transition-colors ${
|
||||
active
|
||||
? 'bg-[var(--ink)] text-[var(--bg)]'
|
||||
: 'border border-[var(--line)] text-[var(--ink-soft)] hover:border-[var(--ink)] hover:text-[var(--ink)]'
|
||||
? 'bg-[var(--ink)] text-white'
|
||||
: 'border border-[var(--line)] bg-[var(--bg-card)] text-[var(--ink-soft)] hover:border-[var(--ink-muted)] hover:text-[var(--ink)]'
|
||||
}`}
|
||||
>
|
||||
{label}
|
||||
@@ -70,22 +61,40 @@ export function RequirementForm({ initialData, onSubmit, onCancel }: Props) {
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex justify-end gap-2 pt-2">
|
||||
<button
|
||||
type="button"
|
||||
onClick={onCancel}
|
||||
className="rounded-md px-4 py-2 text-[13px] text-[var(--ink-soft)] hover:bg-[var(--line-soft)]"
|
||||
>
|
||||
取消
|
||||
</button>
|
||||
<button
|
||||
type="submit"
|
||||
className="rounded-md bg-[var(--ink)] px-5 py-2 text-[13px] font-medium text-[var(--bg)] transition-colors hover:bg-[var(--accent)]"
|
||||
>
|
||||
{initialData ? '保存修改' : '创建需求'}
|
||||
</button>
|
||||
</div>
|
||||
</Field>
|
||||
<FormActions onCancel={onCancel} submitLabel={initialData ? '保存' : '创建'} />
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
function Field({ label, required, children }: { label: string; required?: boolean; children: React.ReactNode }) {
|
||||
return (
|
||||
<div>
|
||||
<label className="mb-1.5 block text-[12px] font-medium text-[var(--ink-soft)]">
|
||||
{label}
|
||||
{required && <span className="ml-0.5 text-red-500">*</span>}
|
||||
</label>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function FormActions({ onCancel, submitLabel }: { onCancel: () => void; submitLabel: string }) {
|
||||
return (
|
||||
<div className="flex justify-end gap-2 pt-2">
|
||||
<button
|
||||
type="button"
|
||||
onClick={onCancel}
|
||||
className="h-8 rounded-lg border border-[var(--line)] bg-[var(--bg-card)] px-3 text-[13px] text-[var(--ink-soft)] hover:bg-[var(--bg-subtle)] hover:text-[var(--ink)]"
|
||||
>
|
||||
取消
|
||||
</button>
|
||||
<button
|
||||
type="submit"
|
||||
className="h-8 rounded-lg bg-[var(--accent)] px-4 text-[13px] font-medium text-white shadow-[var(--shadow-sm)] hover:bg-[var(--accent-hover)]"
|
||||
>
|
||||
{submitLabel}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,41 +7,19 @@ interface Props {
|
||||
status: RequirementStatus;
|
||||
}
|
||||
|
||||
const STATUS_STYLES: Record<RequirementStatus, { bg: string; text: string; dot: string }> = {
|
||||
[RequirementStatus.DRAFT]: {
|
||||
bg: 'bg-[var(--line-soft)]',
|
||||
text: 'text-[var(--ink-soft)]',
|
||||
dot: 'bg-[var(--ink-muted)]',
|
||||
},
|
||||
[RequirementStatus.REVIEWING]: {
|
||||
bg: 'bg-blue-50',
|
||||
text: 'text-blue-700',
|
||||
dot: 'bg-blue-500',
|
||||
},
|
||||
[RequirementStatus.APPROVED]: {
|
||||
bg: 'bg-emerald-50',
|
||||
text: 'text-emerald-700',
|
||||
dot: 'bg-emerald-500',
|
||||
},
|
||||
[RequirementStatus.REJECTED]: {
|
||||
bg: 'bg-red-50',
|
||||
text: 'text-red-700',
|
||||
dot: 'bg-red-500',
|
||||
},
|
||||
[RequirementStatus.DELIVERED]: {
|
||||
bg: 'bg-purple-50',
|
||||
text: 'text-purple-700',
|
||||
dot: 'bg-purple-500',
|
||||
},
|
||||
const STATUS_STYLES: Record<RequirementStatus, string> = {
|
||||
[RequirementStatus.DRAFT]: 'bg-zinc-100 text-zinc-700 ring-zinc-200',
|
||||
[RequirementStatus.REVIEWING]: 'bg-blue-50 text-blue-700 ring-blue-200',
|
||||
[RequirementStatus.APPROVED]: 'bg-emerald-50 text-emerald-700 ring-emerald-200',
|
||||
[RequirementStatus.REJECTED]: 'bg-red-50 text-red-700 ring-red-200',
|
||||
[RequirementStatus.DELIVERED]: 'bg-violet-50 text-violet-700 ring-violet-200',
|
||||
};
|
||||
|
||||
export function RequirementStatusBadge({ status }: Props) {
|
||||
const style = STATUS_STYLES[status];
|
||||
return (
|
||||
<span
|
||||
className={`inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-medium ${style.bg} ${style.text}`}
|
||||
className={`inline-flex items-center rounded-md px-1.5 py-0.5 text-[11px] font-medium ring-1 ring-inset ${STATUS_STYLES[status]}`}
|
||||
>
|
||||
<span className={`h-1.5 w-1.5 rounded-full ${style.dot}`} />
|
||||
{REQUIREMENT_STATUS_LABEL[status]}
|
||||
</span>
|
||||
);
|
||||
|
||||
@@ -37,8 +37,8 @@ export function RequirementTable({
|
||||
}: Props) {
|
||||
return (
|
||||
<div>
|
||||
<div className="mb-6 flex flex-wrap items-center justify-between gap-3">
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
<div className="mb-4 flex flex-wrap items-center justify-between gap-3">
|
||||
<div className="flex flex-wrap gap-1">
|
||||
<FilterChip active={!statusFilter} onClick={() => onFilterChange(null)}>
|
||||
全部
|
||||
</FilterChip>
|
||||
@@ -50,59 +50,52 @@ export function RequirementTable({
|
||||
</div>
|
||||
<button
|
||||
onClick={onCreate}
|
||||
className="rounded-md bg-[var(--ink)] px-4 py-2 text-[13px] font-medium text-[var(--bg)] transition-colors hover:bg-[var(--accent)]"
|
||||
className="flex h-8 items-center gap-1 rounded-lg bg-[var(--accent)] px-3 text-[13px] font-medium text-white shadow-[var(--shadow-sm)] transition-colors hover:bg-[var(--accent-hover)]"
|
||||
>
|
||||
+ 新建需求
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{requirements.length === 0 ? (
|
||||
<div className="rounded-xl border border-dashed border-[var(--line)] py-20 text-center">
|
||||
<p className="font-display text-lg text-[var(--ink-muted)]">暂无需求</p>
|
||||
<p className="mt-1 text-[12px] text-[var(--ink-muted)]">点击"新建需求"开始记录</p>
|
||||
<div className="rounded-2xl border border-dashed border-[var(--line)] bg-[var(--bg-card)] py-16 text-center">
|
||||
<p className="text-[14px] font-medium text-[var(--ink-soft)]">暂无需求</p>
|
||||
<p className="mt-1.5 text-[12.5px] text-[var(--ink-muted)]">点击"新建需求"添加</p>
|
||||
</div>
|
||||
) : (
|
||||
<div className="overflow-hidden rounded-xl border border-[var(--line)] bg-[var(--bg-elevated)]">
|
||||
<table className="w-full text-left">
|
||||
<div className="overflow-hidden rounded-2xl border border-[var(--line)] bg-[var(--bg-card)] shadow-[var(--shadow-sm)]">
|
||||
<table className="w-full text-left text-[13px]">
|
||||
<thead>
|
||||
<tr className="border-b border-[var(--line)] bg-[var(--bg)]">
|
||||
<th className="w-12 py-3 pl-6 font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--ink-muted)]">№</th>
|
||||
<th className="py-3 font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--ink-muted)]">标题</th>
|
||||
<th className="py-3 font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--ink-muted)]">状态</th>
|
||||
<th className="py-3 font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--ink-muted)]">优先级</th>
|
||||
<th className="py-3 font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--ink-muted)]">创建者</th>
|
||||
<th className="py-3 pr-6 font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--ink-muted)]">操作</th>
|
||||
<tr className="border-b border-[var(--line)] bg-[var(--bg-subtle)]">
|
||||
<th className="px-4 py-2.5 text-[11.5px] font-medium uppercase tracking-wide text-[var(--ink-muted)]">标题</th>
|
||||
<th className="px-4 py-2.5 text-[11.5px] font-medium uppercase tracking-wide text-[var(--ink-muted)]">状态</th>
|
||||
<th className="px-4 py-2.5 text-[11.5px] font-medium uppercase tracking-wide text-[var(--ink-muted)]">优先级</th>
|
||||
<th className="px-4 py-2.5 text-[11.5px] font-medium uppercase tracking-wide text-[var(--ink-muted)]">创建者</th>
|
||||
<th className="px-4 py-2.5 text-right text-[11.5px] font-medium uppercase tracking-wide text-[var(--ink-muted)]">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{requirements.map((req, idx) => (
|
||||
<tr
|
||||
key={req.id}
|
||||
className="border-b border-[var(--line-soft)] transition-colors last:border-0 hover:bg-[var(--line-soft)]"
|
||||
>
|
||||
<td className="py-4 pl-6 font-mono text-[11px] tabular-nums text-[var(--ink-muted)]">
|
||||
{String(idx + 1).padStart(2, '0')}
|
||||
{requirements.map((req) => (
|
||||
<tr key={req.id} className="border-b border-[var(--line-soft)] last:border-0 hover:bg-[var(--bg-subtle)]">
|
||||
<td className="max-w-md truncate px-4 py-3 font-medium text-[var(--ink)]" title={req.title}>
|
||||
{req.title}
|
||||
</td>
|
||||
<td className="py-4 pr-6 font-medium text-[var(--ink)]">{req.title}</td>
|
||||
<td className="py-4">
|
||||
<td className="px-4 py-3">
|
||||
<RequirementStatusBadge status={req.status} />
|
||||
</td>
|
||||
<td className="py-4 text-[13px] text-[var(--ink-soft)]">
|
||||
{PRIORITY_LABEL[req.priority] || '无'}
|
||||
</td>
|
||||
<td className="py-4 text-[13px] text-[var(--ink-soft)]">{req.creator?.name || '—'}</td>
|
||||
<td className="py-4 pr-6">
|
||||
<div className="flex gap-1">
|
||||
<td className="px-4 py-3 text-[var(--ink-soft)]">{PRIORITY_LABEL[req.priority] || '无'}</td>
|
||||
<td className="px-4 py-3 text-[var(--ink-soft)]">{req.creator?.name || '—'}</td>
|
||||
<td className="px-4 py-3 text-right">
|
||||
<div className="inline-flex gap-1">
|
||||
<button
|
||||
onClick={() => onEdit(req)}
|
||||
className="rounded p-1.5 text-[var(--ink-muted)] hover:bg-[var(--bg)] hover:text-[var(--ink)]"
|
||||
className="rounded-md p-1.5 text-[var(--ink-muted)] transition-colors hover:bg-[var(--bg-hover)] hover:text-[var(--ink)]"
|
||||
title="编辑"
|
||||
>
|
||||
<Pencil className="h-3.5 w-3.5" strokeWidth={1.75} />
|
||||
</button>
|
||||
<button
|
||||
onClick={() => onDelete(req.id)}
|
||||
className="rounded p-1.5 text-[var(--ink-muted)] hover:bg-[var(--bg)] hover:text-[var(--accent)]"
|
||||
className="rounded-md p-1.5 text-[var(--ink-muted)] transition-colors hover:bg-red-50 hover:text-red-600"
|
||||
title="删除"
|
||||
>
|
||||
<Trash2 className="h-3.5 w-3.5" strokeWidth={1.75} />
|
||||
@@ -131,10 +124,10 @@ function FilterChip({
|
||||
return (
|
||||
<button
|
||||
onClick={onClick}
|
||||
className={`rounded-full px-3 py-1.5 text-[12px] transition-all ${
|
||||
className={`h-7 rounded-md px-2.5 text-[12.5px] transition-colors ${
|
||||
active
|
||||
? 'bg-[var(--ink)] text-[var(--bg)]'
|
||||
: 'border border-[var(--line)] text-[var(--ink-soft)] hover:border-[var(--ink)] hover:text-[var(--ink)]'
|
||||
? 'bg-[var(--ink)] text-white'
|
||||
: 'border border-[var(--line)] bg-[var(--bg-card)] text-[var(--ink-soft)] hover:border-[var(--ink-muted)] hover:text-[var(--ink)]'
|
||||
}`}
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user