ant-design/components/message/demo/duration.md
MadCcc 6776bb8916
docs: demo support react18 (#34843)
* docs: update demo

* chore: add script

* test: fix demo test

* docs: convert demos

* chore: move script

* test: remove react-dom import

* chore: update deps

* docs: update riddle js

* test: fix image test

* docs: fix riddle demo
2022-04-03 23:27:45 +08:00

473 B

order title
2
zh-CN en-US
修改延时 Customize duration

zh-CN

自定义时长 10s,默认时长为 3s

en-US

Customize message display duration from default 3s to 10s.

import { message, Button } from 'antd';

const success = () => {
  message.success('This is a prompt message for success, and it will disappear in 10 seconds', 10);
};

export default () => <Button onClick={success}>Customized display duration</Button>;