跳到主要内容

Alert

示例

代码

import { error, success, warning, info } from './'
import Button from '../button'

export default function AlertDemo() {
return (
<div className="demo-container">
<div className="demo-row">
<Button onClick={() => error('Error')} data-color="error">
Error
</Button>
<Button onClick={() => success('Success')} data-color="success">
Success
</Button>
<Button onClick={() => warning('Warning')} data-color="warning">
Warning
</Button>
<Button onClick={() => info('Info')} data-color="info">
Info
</Button>
</div>
</div>
)
}