mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 17:19:11 +08:00
cdc4e50873
* feat: migrate less to token for Alert * fix: lint * feat(alert): add component token demo * test: add snap * Update docs/react/migrate-less-variables.zh-CN.md Co-authored-by: MadCcc <1075746765@qq.com> * feat(alert): update token name * feat(alert): update demo * feat: update snap * doc: update migrate * chore: code clean * feat: alert token * chore: code clean * chore: fix lint --------- Co-authored-by: @linhf2023 <32009993+any1024@users.noreply.github.com> Co-authored-by: MadCcc <1075746765@qq.com>
29 lines
592 B
TypeScript
29 lines
592 B
TypeScript
import { SmileOutlined } from '@ant-design/icons';
|
|
import React from 'react';
|
|
import { Alert, ConfigProvider } from 'antd';
|
|
|
|
const icon = <SmileOutlined />;
|
|
|
|
const App: React.FC = () => (
|
|
<ConfigProvider
|
|
theme={{
|
|
components: {
|
|
Alert: {
|
|
withDescriptionIconSize: 32,
|
|
withDescriptionPadding: 16,
|
|
},
|
|
},
|
|
}}
|
|
>
|
|
<Alert
|
|
icon={icon}
|
|
message="Success Tips"
|
|
description="Detailed description and advices about successful copywriting."
|
|
type="success"
|
|
showIcon
|
|
/>
|
|
</ConfigProvider>
|
|
);
|
|
|
|
export default App;
|