feat: align projects page with Figma design
This commit is contained in:
parent
78848dd7d1
commit
9de99c833b
42 changed files with 347 additions and 384 deletions
|
|
@ -2,7 +2,7 @@ import React from 'react'
|
|||
import { useNavigate } from 'react-router-dom'
|
||||
import { showToast } from '../../../components/feedback/Toast'
|
||||
|
||||
export const UserInfo: React.FC = () => {
|
||||
export const UserInfo: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => {
|
||||
const navigate = useNavigate()
|
||||
|
||||
const handleLogout = () => {
|
||||
|
|
@ -15,10 +15,10 @@ export const UserInfo: React.FC = () => {
|
|||
<button
|
||||
type="button"
|
||||
onClick={() => showToast.info('Tài liệu hướng dẫn sử dụng danable v1.0')}
|
||||
className="flex w-full items-center gap-2 px-2 py-1.5 text-xs font-medium text-slate-600 hover:text-slate-900 transition-colors"
|
||||
className={`flex w-full items-center gap-2 text-xs font-medium text-slate-600 transition-colors hover:text-slate-900 ${isProjectList ? 'px-2.5 py-2 text-[11px]' : 'px-2 py-1.5'}`}
|
||||
>
|
||||
<svg
|
||||
className="h-4 w-4 text-slate-400"
|
||||
{isProjectList ? <img className="h-4 w-4" src="/assets/projects-ui/circle-help.svg" alt="" /> : <svg
|
||||
className={`h-4 w-4 ${isProjectList ? 'text-[#697386]' : 'text-slate-400'}`}
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
|
|
@ -29,25 +29,25 @@ export const UserInfo: React.FC = () => {
|
|||
strokeLinejoin="round"
|
||||
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||
/>
|
||||
</svg>
|
||||
</svg>}
|
||||
<span>Tài liệu & hỗ trợ</span>
|
||||
</button>
|
||||
|
||||
<div className="border-t border-slate-200 pt-3 flex items-center justify-between">
|
||||
<div className={`flex items-center justify-between ${isProjectList ? 'border-t border-[#2d374d] pt-[18px]' : 'border-t border-slate-200 pt-3'}`}>
|
||||
<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-orange-100 text-xs font-bold text-slate-800">
|
||||
<div className={`flex shrink-0 items-center justify-center rounded-full font-semibold ${isProjectList ? 'h-[34px] w-[34px] bg-[#f5ded6] text-[11px] text-[#332926]' : 'h-8 w-8 bg-orange-100 text-xs text-slate-800'}`}>
|
||||
MA
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<div className="truncate text-xs font-semibold text-slate-900">
|
||||
<div className={`truncate font-semibold ${isProjectList ? 'text-[12px] text-[#332926]' : 'text-xs text-slate-900'}`}>
|
||||
Minh Anh
|
||||
</div>
|
||||
<div className="truncate text-[11px] text-slate-500">
|
||||
<div className={`truncate ${isProjectList ? 'text-[10px] text-[#332926]' : 'text-[11px] text-slate-500'}`}>
|
||||
Quản trị viên
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
{!isProjectList && <button
|
||||
type="button"
|
||||
onClick={handleLogout}
|
||||
title="Đăng xuất"
|
||||
|
|
@ -66,7 +66,7 @@ export const UserInfo: React.FC = () => {
|
|||
d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
</button>}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue