Skip to content

Commit c1175dd

Browse files
author
hy
committed
fix: button添加主题色
1 parent b8494fd commit c1175dd

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

example/examples/src/routes/Button/index.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,29 @@ export default class ButtonView extends React.Component<ButtonViewProps> {
1616
<Container>
1717
<Layout>
1818
<Header title={title} description={description} />
19-
<Body>
19+
<Body style={{ padding: 15 }}>
2020
<Card title="基础实例">
2121
<Flex>
22-
<Button type="primary">默认按钮</Button>
22+
<Button type="primary">蓝色按钮</Button>
2323
<Spacing type="horizontal" />
24-
<Button>默认按钮</Button>
24+
<Button>主题色按钮</Button>
2525
<Spacing type="horizontal" />
26-
<Button>按钮</Button>
26+
<Button type="success">绿色按钮</Button>
2727
</Flex>
2828
<Spacing />
29-
<Button>默认按钮</Button>
29+
<Button>主题色按钮</Button>
3030
<Spacing />
31-
<Button disabled>默认禁用按钮</Button>
31+
<Button disabled>禁用按钮</Button>
3232
<Spacing />
3333
<Button type="primary">主要按钮 primary </Button>
3434
<Spacing />
35-
<Button type="danger" disabled>
35+
<Button type="danger">
3636
错误按钮 danger
3737
</Button>
3838
<Spacing />
3939
<Button type="success">成功按钮 success</Button>
4040
<Spacing />
41-
<Button type="warning" disabled>
41+
<Button type="warning">
4242
警告禁用按钮 warning
4343
</Button>
4444
<Spacing />
@@ -50,14 +50,14 @@ export default class ButtonView extends React.Component<ButtonViewProps> {
5050
亮按钮 light
5151
</Button>
5252
<Spacing />
53-
<Button type="dark" loading disabled>
53+
<Button type="dark" loading >
5454
暗按钮 dark
5555
</Button>
5656
<Spacing />
57-
<Button loading>默认按钮</Button>
57+
<Button loading>主题色按钮</Button>
5858
<Spacing />
5959
<Button loading disabled>
60-
默认按钮 禁用
60+
主题色按钮 禁用
6161
</Button>
6262
</Card>
6363
<Card title="按钮圆角设置">

packages/core/src/Button/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default function ButtonView<T>(props: ButtonProps) {
8585
}
8686
if (disabled) {
8787
textColor = colorF(theme.colors.disabled).alpha(0.1).rgb().string();
88-
backgroundColor = colorF(backgroundColor).rgb().string();
88+
backgroundColor = colorF(theme.colors.disabled).rgb().string();
8989
}
9090
if (buttonColor) {
9191
backgroundColor = colorF(buttonColor).rgb().string();

0 commit comments

Comments
 (0)