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

43 lines
740 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';
ReactDOM.render(
<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>
</ConfigProvider>,
mountNode,
);
```