ant-design/components/button/demo/debug-token.md
2022-04-12 16:46:19 +08:00

732 B

order title debug
999
zh-CN en-US
覆盖组件样式 Override Component Style
true
import { Button, ConfigProvider, Space } from 'antd';

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>
  </ConfigProvider>
);