fix Toast click

This commit is contained in:
zZOMZz
2023-04-29 01:44:09 +08:00
parent c09698d1f0
commit 2a49da6cca

View File

@@ -197,11 +197,19 @@ export function showToast(
}, 300); }, 300);
}; };
const newAction = {
text: action?.text || "",
onClick: () => {
action?.onClick();
close();
},
};
setTimeout(() => { setTimeout(() => {
close(); close();
}, delay); }, delay);
root.render(<Toast content={content} action={action} />); root.render(<Toast content={content} action={newAction} />);
} }
export type InputProps = React.HTMLProps<HTMLTextAreaElement> & { export type InputProps = React.HTMLProps<HTMLTextAreaElement> & {