mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-26 06:00:52 +08:00

* feat: Supports customizing the background color of default type buttons in disabled state * test: add corresponding test case * feat: Supports customizing the background color of dashed type buttons in disabled state * test: add corresponding test case * chore: add custom disabled backgroundColor demo * chore: add snapshot * chore: add whitespace * chore: Modify the variable name of the button token * test: update test * chore: update snapshot * chore: update snapshot * Update components/button/style/token.ts docs: update comments Co-authored-by: thinkasany <480968828@qq.com> Signed-off-by: Ryan <55972954+yellowryan@users.noreply.github.com> --------- Signed-off-by: Ryan <55972954+yellowryan@users.noreply.github.com> Co-authored-by: thinkasany <480968828@qq.com>
28 lines
609 B
TypeScript
28 lines
609 B
TypeScript
import React from 'react';
|
|
import { Button, Flex, ConfigProvider } from 'antd';
|
|
|
|
const App: React.FC = () => (
|
|
<Flex gap="small" wrap>
|
|
<ConfigProvider
|
|
theme={{
|
|
components: {
|
|
Button: {
|
|
defaultBgDisabled: 'rgba(0,0,0,0.1)',
|
|
dashedBgDisabled: 'rgba(0,0,0,0.4)',
|
|
},
|
|
},
|
|
}}
|
|
>
|
|
<Button type="primary" disabled>
|
|
Primary Button
|
|
</Button>
|
|
<Button disabled>Default Button</Button>
|
|
<Button type="dashed" disabled>
|
|
Dashed Button
|
|
</Button>
|
|
</ConfigProvider>
|
|
</Flex>
|
|
);
|
|
|
|
export default App;
|