Files
yunhaifinance/frontend/src/components/common/CompanyLogo.tsx
T
a273825743 706dcc24eb 备份:PWA配置前的完整版本
包含所有最新开发的功能和修复,作为PWA正确配置前的备份点。
2026-06-13 12:44:48 +08:00

65 lines
1.5 KiB
TypeScript

import React from 'react'
import { Space, Typography } from 'antd'
import { ThunderboltOutlined } from '@ant-design/icons'
import { useLanguageStore } from '../../store/languageStore'
const { Text, Title } = Typography
interface CompanyLogoProps {
showText?: boolean
size?: 'small' | 'medium' | 'large'
}
const CompanyLogo: React.FC<CompanyLogoProps> = ({ showText = true, size = 'medium' }) => {
const { t, currentLanguage } = useLanguageStore()
const sizeMap = {
small: { fontSize: 14, iconSize: 20 },
medium: { fontSize: 16, iconSize: 28 },
large: { fontSize: 20, iconSize: 36 }
}
const { fontSize, iconSize } = sizeMap[size]
return (
<Space align="center" style={{ cursor: 'pointer' }}>
{/* 图标 */}
<ThunderboltOutlined
style={{
fontSize: iconSize,
color: '#1890ff',
fontWeight: 'bold'
}}
/>
{/* 公司名称 */}
{showText && (
<div>
<Title
level={5}
style={{
margin: 0,
fontSize: fontSize,
color: '#262626',
fontWeight: 600
}}
>
{t('login.title')}
</Title>
<Text
type="secondary"
style={{
fontSize: fontSize - 4,
display: 'block',
marginTop: -2
}}
>
Qingyuan Power Laos
</Text>
</div>
)}
</Space>
)
}
export default CompanyLogo