Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 709 Bytes

style.md

File metadata and controls

39 lines (29 loc) · 709 Bytes

自定义样式

  • order: 5

使用 style 和 className 来定义样式。

:::lang=en-us

Custom Style

  • order: 5

use style or className to custom style;

:::


import { Notification, Button } from '@alifd/next';

const openNotification = () => {
    Notification.open({
        title: 'Notification Title',
        content:
        'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
        style: {
            width: 600,
            marginLeft: -225,
        },
    });
};

ReactDOM.render(
    <Button type="primary" onClick={openNotification}>
        Open Notification
    </Button>,
    mountNode,
);