feat(react-web-next): 新增.editorconfig和.prettierrc配置文件,添加public/.gitkeep占位文件

This commit is contained in:
2025-09-23 10:32:35 +08:00
parent 10ddfd6f75
commit 408b500b6a
199 changed files with 16850 additions and 34874 deletions
@@ -0,0 +1,27 @@
import React from 'react';
import { Button, Tooltip } from 'antd';
import { MoonOutlined, SunOutlined } from '@ant-design/icons';
import type { ThemeMode } from '@/theme';
export interface ThemeSwitchProps {
mode: ThemeMode;
onToggle: () => void;
}
const ThemeSwitch: React.FC<ThemeSwitchProps> = ({ mode, onToggle }) => {
return (
<Tooltip title={mode === 'dark' ? '切换为亮色' : '切换为暗色'}>
<Button
type="text"
onClick={onToggle}
icon={mode === 'dark' ? <SunOutlined /> : <MoonOutlined />}
style={{ color: 'var(--text-primary)' }}
>
{mode === 'dark' ? '亮色' : '暗色'}
</Button>
</Tooltip>
);
};
export default ThemeSwitch;