() => {
const [showDialog, setShowDialog] = React.useState(false);
return (
<>
{showDialog && (
<Dialog
title="Accept notifications?"
description="Stay up to date with all travel possibilities."
renderInPortal={false}
primaryAction={
<Button
onClick={() => {
setShowDialog(false);
}}
>
Accept
</Button>
}
secondaryAction={
<Button
type="secondary"
onClick={() => {
setShowDialog(false);
}}
>
Cancel
</Button>
}
/>
)}
{!showDialog && (
<Button
onClick={() => {
setShowDialog(true);
}}
>
Show dialog
</Button>
)}
</>
);
};