Aurora Admin v1.2.0: 79 components x 5 ends, doc site, contracts batch 1, playground, regression, deploy ready

This commit is contained in:
aurora-admin
2026-09-10 19:21:56 +08:00
commit 51ce3a28f7
654 changed files with 49082 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
import React from 'react';
import './ThemeSwitcher.css';
const MODES = [
{ value: 'light', label: '浅色' },
{ value: 'dark', label: '深色' }
];
const BRANDS = ['#2F54EB', '#1677FF', '#722ED1', '#13C2C2', '#FA541C', '#EB2F96'];
export default function ThemeSwitcher({ mode = 'light', brand = '#2F54EB', onModeChange, onBrandChange }) {
return (
<div className="aa-themesw">
{MODES.map((m) => (
<div
key={m.value}
className={'aa-themesw-opt' + (mode === m.value ? ' is-active' : '')}
onClick={() => onModeChange && onModeChange(m.value)}
>
<span className={'aa-themesw-dot ' + m.value} />
{m.label}
</div>
))}
<div className="aa-themesw-colors">
{BRANDS.map((c) => (
<span
key={c}
className={'aa-themesw-color' + (brand === c ? ' is-active' : '')}
style={{ background: c }}
onClick={() => onBrandChange && onBrandChange(c)}
/>
))}
</div>
<div className="aa-themesw-label">品牌色:{brand}(应用于 CSS 变量 --brand 实时预览)</div>
</div>
);
}