fix: dark mode color

This commit is contained in:
行弌 2024-11-18 18:51:40 +08:00
parent e34bf87217
commit 6e4f457249
2 changed files with 10 additions and 12 deletions

View File

@ -68,23 +68,24 @@ const App: React.FC = () => {
Link
</Button>
</Flex>
<Flex gap="middle" wrap>
<Button color="gold" variant="solid">
<Button color="cyan" variant="solid">
Solid
</Button>
<Button color="gold" variant="outlined">
<Button color="cyan" variant="outlined">
Outlined
</Button>
<Button color="gold" variant="dashed">
<Button color="cyan" variant="dashed">
Dashed
</Button>
<Button color="gold" variant="filled">
<Button color="cyan" variant="filled">
Filled
</Button>
<Button color="gold" variant="text">
<Button color="cyan" variant="text">
Text
</Button>
<Button color="gold" variant="link">
<Button color="cyan" variant="link">
Link
</Button>
</Flex>

View File

@ -449,12 +449,11 @@ const genDangerousStyle: GenerateStyle<ButtonToken, CSSObject> = (token) => ({
const genPresetColorStyle: GenerateStyle<ButtonToken, CSSObject> = (token) => ({
color: token.colorPrimary,
boxShadow: token.primaryShadow,
boxShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlOutline}`,
...genSolidButtonStyle(
token,
token.solidTextColor,
token.dangerColor,
token.colorPrimary,
{
background: token.colorPrimaryHover,
@ -470,13 +469,11 @@ const genPresetColorStyle: GenerateStyle<ButtonToken, CSSObject> = (token) => ({
token.colorBgContainer,
{
color: token.colorPrimaryTextHover,
borderColor: token.colorPrimaryHover,
background: token.colorBgContainer,
borderColor: token.colorPrimaryBorderHover,
},
{
color: token.colorPrimaryTextActive,
borderColor: token.colorPrimaryActive,
background: token.colorBgContainer,
},
),