2022-03-24 18:44:42 +08:00
|
|
|
---
|
|
|
|
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 () => (
|
2022-03-24 18:44:42 +08:00
|
|
|
<ConfigProvider
|
|
|
|
theme={{
|
|
|
|
override: {
|
2022-03-29 15:57:39 +08:00
|
|
|
Button: {
|
2022-03-24 18:44:42 +08:00
|
|
|
colorBgTextHover: 'red',
|
|
|
|
colorBgTextActive: 'blue',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Space>
|
|
|
|
<Button type="text">Text 1</Button>
|
|
|
|
|
|
|
|
<ConfigProvider
|
|
|
|
theme={{
|
|
|
|
override: {
|
2022-03-29 15:57:39 +08:00
|
|
|
Button: {
|
2022-03-24 18:44:42 +08:00
|
|
|
colorBgTextHover: 'orange',
|
|
|
|
colorBgTextActive: 'blue',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Button type="text">Text 2</Button>
|
|
|
|
</ConfigProvider>
|
|
|
|
</Space>
|
2022-04-12 16:46:19 +08:00
|
|
|
</ConfigProvider>
|
2022-03-24 18:44:42 +08:00
|
|
|
);
|
|
|
|
```
|