feat(frontend): 完成品牌 SVG 与后台 Phase 1 基础切片
This commit is contained in:
@@ -1,17 +1,28 @@
|
||||
import logo from '@/assets/brand/logo-jieyou.png'
|
||||
import logoDark from '@/assets/brand/logo-dark.svg'
|
||||
import logoLight from '@/assets/brand/logo-light.svg'
|
||||
import logoSeal from '@/assets/brand/logo-seal.svg'
|
||||
|
||||
export type BrandLogoVariant = 'light' | 'dark' | 'seal'
|
||||
|
||||
interface BrandLogoProps {
|
||||
height?: number
|
||||
variant?: BrandLogoVariant
|
||||
className?: string
|
||||
}
|
||||
|
||||
export function BrandLogo({ height = 44, className }: BrandLogoProps) {
|
||||
const logoSources: Record<BrandLogoVariant, string> = {
|
||||
light: logoLight,
|
||||
dark: logoDark,
|
||||
seal: logoSeal,
|
||||
}
|
||||
|
||||
export function BrandLogo({ height = 44, variant = 'light', className }: BrandLogoProps) {
|
||||
return (
|
||||
<img
|
||||
src={logo}
|
||||
src={logoSources[variant]}
|
||||
alt="解忧商行 JIEYOU TRADING HOUSE"
|
||||
className={className}
|
||||
style={{ height, width: 'auto', display: 'block', borderRadius: 4 }}
|
||||
style={{ height, width: 'auto', display: 'block' }}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { Spin } from 'antd'
|
||||
|
||||
export function PageLoading({ tip = '正在核对商行账本…' }: { tip?: string }) {
|
||||
return (
|
||||
<div className="page-loading">
|
||||
<Spin size="large" tip={tip}>
|
||||
<div className="page-loading__placeholder" />
|
||||
</Spin>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user