ant-design/components/button/demo/debug-token.md

42 lines
732 B
Markdown
Raw Normal View History

---
order: 999
title:
zh-CN: 覆盖组件样式
en-US: Override Component Style
debug: true
---
```tsx
import { Button, ConfigProvider, Space } from 'antd';
2022-04-12 16:46:19 +08:00
export default () => (
<ConfigProvider
theme={{
override: {
Button: {
colorBgTextHover: 'red',
colorBgTextActive: 'blue',
},
},
}}
>
<Space>
<Button type="text">Text 1</Button>
<ConfigProvider
theme={{
override: {
Button: {
colorBgTextHover: 'orange',
colorBgTextActive: 'blue',
},
},
}}
>
<Button type="text">Text 2</Button>
</ConfigProvider>
</Space>
2022-04-12 16:46:19 +08:00
</ConfigProvider>
);
```