-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
const options = { render: (message, onConfirm, onCancel) => { return ( <> <h2> "Are you sure? </h2> <p>{message}</p> <PrimaryButton onClick={onConfirm} text="Yes" style={{ marginRight: '10px' }} /> <DefaultButton onClick={onCancel} text="No" style={{ marginLeft: '10px' }} /> </> ); } };
then the statement:
const result = await confirm(message, options);
Shows error:
TS2345: Argument of type '{ render: (message: any, onConfirm: any, onCancel: any) => Element; }' is not assignable to parameter of type 'Options'.
The types returned by 'render(...)' are incompatible between these types.
Type 'Element' is missing the following properties from type 'Element': attributes, classList, className, clientHeight, and 123 more.
How can I fix it?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels