ant-design/components/message/demo/component-token.tsx
MadCcc 4f9c8e2af2
fix: global token in Component Token override should be respected (#42535)
* fix: global token in Component Token override should be respected

* test: add snapshot
2023-05-23 13:39:05 +08:00

34 lines
743 B
TypeScript

import { ConfigProvider, message } from 'antd';
import React from 'react';
/** Test usage. Do not use in your production. */
const { _InternalPanelDoNotUseOrYouWillBeFired: InternalPanel } = message;
export default () => (
<>
<ConfigProvider
theme={{
components: {
Message: {
contentPadding: 40,
contentBg: '#e6f4ff',
},
},
}}
>
<InternalPanel content="Hello World!" type="error" />
</ConfigProvider>
<ConfigProvider
theme={{
components: {
Message: {
colorBgElevated: '#e6f4ff',
},
},
}}
>
<InternalPanel content="Hello World!" type="error" />
</ConfigProvider>
</>
);