feat: align projects page with Figma design

This commit is contained in:
quanganh2k4 2026-10-30 23:26:57 +07:00
parent 78848dd7d1
commit 9de99c833b
42 changed files with 347 additions and 384 deletions

View file

@ -1,7 +1,7 @@
import React, { useState } from 'react'
import { showToast } from '../../../components/feedback/Toast'
export const WorkspaceSelector: React.FC = () => {
export const WorkspaceSelector: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => {
const [open, setOpen] = useState(false)
return (
@ -9,34 +9,28 @@ export const WorkspaceSelector: React.FC = () => {
<button
type="button"
onClick={() => setOpen((prev) => !prev)}
className="w-full flex items-center justify-between rounded-xl border border-slate-300/90 bg-white px-3 py-2.5 text-left hover:border-slate-400 transition-colors"
className={`w-full flex items-center justify-between bg-white text-left transition-colors ${isProjectList ? 'gap-[9px] rounded-[8px] border border-[#344057] p-2.5 hover:border-[#344057]' : 'rounded-xl border border-slate-300/90 px-3 py-2.5 hover:border-slate-400'}`}
>
<div className="flex items-center gap-2.5 min-w-0">
<div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-indigo-50 text-xs font-bold text-slate-700">
<div className={`flex h-8 w-8 shrink-0 items-center justify-center text-[11px] font-semibold text-[#332926] ${isProjectList ? 'h-7 w-7 rounded-[6px] bg-[#d6dae6]' : 'rounded-full bg-indigo-50 text-slate-700'}`}>
VL
</div>
<div className="min-w-0">
<div className="truncate text-sm font-semibold text-slate-900 leading-tight">
<div className={`truncate font-semibold leading-tight ${isProjectList ? 'text-[13px] text-[#332926]' : 'text-sm text-slate-900'}`}>
danable
</div>
<div className="truncate text-[11px] text-slate-500 mt-0.5">
<div className={`truncate mt-0.5 ${isProjectList ? 'text-[10px] text-[#332926]' : 'text-[11px] text-slate-500'}`}>
Không gian nhóm
</div>
</div>
</div>
<svg
className="h-4 w-4 text-slate-400 shrink-0"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={1.8}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M8 9l4-4 4 4m0 6l-4 4-4-4"
/>
</svg>
{isProjectList ? (
<img className="h-[13px] w-[13px] shrink-0" src="/assets/projects-ui/chevrons-up-down.svg" alt="" />
) : (
<svg className="h-4 w-4 shrink-0 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.8}>
<path strokeLinecap="round" strokeLinejoin="round" d="M8 9l4-4 4 4m0 6l-4 4-4-4" />
</svg>
)}
</button>
{open && (