UNPKG

cjd-parkball

Version:

> 中后台业务组件库,中后台就像公园,进入需要买门票(登录),所以以 Parkball(公园球) 命名,公园内必定捕获!作为一个组件库,提供使用方法文档,方便开发者的调用

40 lines (31 loc) 942 B
--- category: 2 title: 带有图标的通知提醒框 title_en: Notification with icon --- zh-CN 通知提醒框左侧有图标。 en-US A notification box with a icon at the left side. ````jsx import { Button, notification } from 'parkball'; const openNotificationWithIcon = (type) => { notification[type]({ message: 'Notification Title', description: 'This is the content of the notification. This is the content of the notification. This is the content of the notification.', }); }; ReactDOM.render( <div> <Button onClick={() => openNotificationWithIcon('success')}>Success</Button> <Button onClick={() => openNotificationWithIcon('info')}>Info</Button> <Button onClick={() => openNotificationWithIcon('warning')}>Warning</Button> <Button onClick={() => openNotificationWithIcon('error')}>Error</Button> </div>, mountNode); ```` <style> .code-box-demo .ant-btn { margin-right: 1em; } </style>