• React hook used to manage the the opening/closing of the Dialog component.

    Example

    const [open, onOpenDialog, onCloseDialog] = useDialogState();

    <Button onClick={openDialog}>
    Open dialog
    </Button>
    <Dialog open={open} onClose={closeDialog}>
    Lorem ipsum dolor sit amet consectetur
    adipisicing elit.
    </Dialog>

    Parameters

    • Optional initialIsOpen: boolean

      An initial open state. If undefined, open defaults to an initial value of false.

      See Dialog.stories.tsx for example usage.

    Returns [boolean, (() => void), (() => void)]

Generated using TypeDoc