docs: add more JSDoc (#48712)

* docs: add more JSDoc

* docs: add more JSDoc
pull/48720/head
lyy 9 months ago committed by GitHub
parent 8a75f60ce2
commit 7d27bedd9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -13,14 +13,34 @@ export interface ConfigOptions {
}
export interface ArgsProps {
/**
* @descCN
* @descEN The content of the message notification, receiving component or string
*/
content: React.ReactNode;
/**
* @descCN
* @descEN How long the message notification remains displayed
*/
duration?: number;
/**
* @descCN 'info''success''error''warning' 'loading'
* @descEN The type of message notification, which can be 'info', 'success', 'error', 'warning' or 'loading'
*/
type?: NoticeType;
/**
* @descCN
* @descEN The callback function called when the message notification is closed
*/
onClose?: () => void;
icon?: React.ReactNode;
key?: string | number;
style?: React.CSSProperties;
className?: string;
/**
* @descCN
* @descEN Callback function when message notification is clicked
*/
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
}
@ -32,7 +52,15 @@ export interface MessageType extends PromiseLike<boolean> {
export type TypeOpen = (
content: JointContent,
duration?: number | VoidFunction, // Also can use onClose directly
/**
* @descCN 使 onClose
* @descEN You can also use onClose directly to determine how long the message notification continues to be displayed.
*/
duration?: number | VoidFunction,
/**
* @descCN
* @descEN The callback function called when the message notification is closed
*/
onClose?: VoidFunction,
) => MessageType;

Loading…
Cancel
Save