Skip to content

Create customisable confirmation modals #69

Open
@NathanVss

Description

@NathanVss

As such:

Image

We need to be able to customize

  • Title
  • Children
  • Buttons

It would be cool to be able to use the same logic as the built in modals of cunningham as such with an await:

export const ConfirmationModal = {
  render: () => {
    const modals = useModals();

    const ask = async () => {
      const decision = await modals.confirmationModal();
      alert(`You decided ${decision}`);
    };

    useEffect(() => {
      ask();
    }, []);

    return <Button onClick={ask}>Open</Button>;
  },
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions