Message
Display global messages as feedback in response to user operations.
#
When To Use- To provide feedback such as success, warning, error etc.
- A message is displayed at top and center and will be dismissed automatically, as a non-interrupting light-weighted prompt.
#
Examples#
Basic#
Customized duration#
Handle Promise#
API#
Methodsmessage.info(content, [duration]) => Promise
message.success(content, [duration]) => Promise
message.warning(content, [duration]) => Promise
message.error(content, [duration]) => Promise
#
ArgumentArgument | Type | Default | Description |
---|---|---|---|
content | string | ReactNode | - | content of the message |
duration | number | 3000 | time(ms) before auto-dismiss. |