[CLAUDE] FE: content polish — typography + PageHeader + Button/Input/Table
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 2m54s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 2m54s
Typography base (both apps): - 14px base, line-height 1.55, letter-spacing -0.003em — Be Vietnam Pro render chắc hơn, dấu tiếng Việt rõ hơn - h1/h2 tracking tighter (-0.018em), h1 weight 700, h2 weight 600 - Tabular numbers trong <table> (tự động align cột số) PageHeader: - Title text-[22px] thay vì text-xl — hierarchy mạnh hơn - Border-bottom + pb-5 thay flat layout — content-area rõ vùng - Description leading-relaxed + slate-500 — dễ đọc hơn Button: - shadow-sm + color-tinted shadow (brand/20, red/20) cho primary/ danger — có chiều sâu - active:translate-y-[0.5px] micro-press feedback - Ring offset 2 (thay 1) + offset-white — focus ring tách rõ Input/Select/Textarea: - h-9 thay h-10 — phù hợp dense table layouts - shadow-[inset_0_1px_0_...] — inset highlight tinh tế - Focus: border-brand-500 + ring-brand-500/20 — 2 lớp chỉ báo - Disabled: bg-slate-50 + opacity-70 — rõ disabled state DataTable: - rounded-xl + shadow-sm + border-200/80 — card feel nhẹ nhàng hơn - Header: UPPERCASE text-[11px] tracking-wider — ERP enterprise look - Row hover: bg-brand-50/40 (thay slate-50) — brand-tinted hover - Padding tăng từ px-3 py-2 → px-4 py-2.5 — breathing room Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -35,15 +35,15 @@ export function DataTable<T>({
|
||||
onRowClick,
|
||||
}: Props<T>) {
|
||||
return (
|
||||
<div className="overflow-auto rounded-md border border-slate-200 bg-white">
|
||||
<div className="overflow-auto rounded-xl border border-slate-200/80 bg-white shadow-sm">
|
||||
<table className="w-full text-sm">
|
||||
<thead className="bg-slate-50 text-slate-700">
|
||||
<tr>
|
||||
<thead className="bg-slate-50/60 text-slate-600">
|
||||
<tr className="border-b border-slate-200/80">
|
||||
{columns.map(c => (
|
||||
<th
|
||||
key={c.key}
|
||||
className={cn(
|
||||
'px-3 py-2 font-medium',
|
||||
'px-4 py-2.5 text-[11px] font-semibold uppercase tracking-wider',
|
||||
c.align === 'right' && 'text-right',
|
||||
c.align === 'center' && 'text-center',
|
||||
c.align !== 'right' && c.align !== 'center' && 'text-left',
|
||||
@ -70,7 +70,7 @@ export function DataTable<T>({
|
||||
Array.from({ length: 5 }).map((_, i) => (
|
||||
<tr key={`sk-${i}`} className="border-t border-slate-100">
|
||||
{columns.map(c => (
|
||||
<td key={c.key} className="px-3 py-3">
|
||||
<td key={c.key} className="px-4 py-3">
|
||||
<div className="h-3 animate-pulse rounded bg-slate-100" />
|
||||
</td>
|
||||
))}
|
||||
@ -78,7 +78,7 @@ export function DataTable<T>({
|
||||
))}
|
||||
{!isLoading && rows.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={columns.length} className="px-3 py-10 text-center text-sm text-slate-400">
|
||||
<td colSpan={columns.length} className="px-4 py-12 text-center text-sm text-slate-400">
|
||||
{empty ?? 'Không có dữ liệu'}
|
||||
</td>
|
||||
</tr>
|
||||
@ -88,8 +88,8 @@ export function DataTable<T>({
|
||||
<tr
|
||||
key={getRowKey(row)}
|
||||
className={cn(
|
||||
'border-t border-slate-100 transition',
|
||||
onRowClick && 'cursor-pointer hover:bg-slate-50',
|
||||
'border-t border-slate-100 text-slate-700 transition-colors',
|
||||
onRowClick && 'cursor-pointer hover:bg-brand-50/40',
|
||||
)}
|
||||
onClick={() => onRowClick?.(row)}
|
||||
>
|
||||
@ -97,7 +97,7 @@ export function DataTable<T>({
|
||||
<td
|
||||
key={c.key}
|
||||
className={cn(
|
||||
'px-3 py-2',
|
||||
'px-4 py-2.5',
|
||||
c.align === 'right' && 'text-right',
|
||||
c.align === 'center' && 'text-center',
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user