Skip to content

Commit

Permalink
fix: button添加主题色
Browse files Browse the repository at this point in the history
  • Loading branch information
hy committed Apr 8, 2023
1 parent b8494fd commit c1175dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions example/examples/src/routes/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@ export default class ButtonView extends React.Component<ButtonViewProps> {
<Container>
<Layout>
<Header title={title} description={description} />
<Body>
<Body style={{ padding: 15 }}>
<Card title="基础实例">
<Flex>
<Button type="primary">默认按钮</Button>
<Button type="primary">蓝色按钮</Button>
<Spacing type="horizontal" />
<Button>默认按钮</Button>
<Button>主题色按钮</Button>
<Spacing type="horizontal" />
<Button>按钮</Button>
<Button type="success">绿色按钮</Button>
</Flex>
<Spacing />
<Button>默认按钮</Button>
<Button>主题色按钮</Button>
<Spacing />
<Button disabled>默认禁用按钮</Button>
<Button disabled>禁用按钮</Button>
<Spacing />
<Button type="primary">主要按钮 primary </Button>
<Spacing />
<Button type="danger" disabled>
<Button type="danger">
错误按钮 danger
</Button>
<Spacing />
<Button type="success">成功按钮 success</Button>
<Spacing />
<Button type="warning" disabled>
<Button type="warning">
警告禁用按钮 warning
</Button>
<Spacing />
Expand All @@ -50,14 +50,14 @@ export default class ButtonView extends React.Component<ButtonViewProps> {
亮按钮 light
</Button>
<Spacing />
<Button type="dark" loading disabled>
<Button type="dark" loading >
暗按钮 dark
</Button>
<Spacing />
<Button loading>默认按钮</Button>
<Button loading>主题色按钮</Button>
<Spacing />
<Button loading disabled>
默认按钮 禁用
主题色按钮 禁用
</Button>
</Card>
<Card title="按钮圆角设置">
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function ButtonView<T>(props: ButtonProps) {
}
if (disabled) {
textColor = colorF(theme.colors.disabled).alpha(0.1).rgb().string();
backgroundColor = colorF(backgroundColor).rgb().string();
backgroundColor = colorF(theme.colors.disabled).rgb().string();
}
if (buttonColor) {
backgroundColor = colorF(buttonColor).rgb().string();
Expand Down

0 comments on commit c1175dd

Please sign in to comment.