Andeus Designfor Reactv0.1
Components · Surfaces

Dialog

A modal question with two answers. The safe answer is ghost; the one Return triggers has the default ring.

jsx
import { Dialog } from '@andeus/ui';

Dialog

jsx
const [open, setOpen] = useState(false);

<Button onClick={() => setOpen(true)}>Delete strategy</Button>
<Dialog
  open={open}
  onClose={() => setOpen(false)}
  title="Delete this strategy?"
  icon="warning-box"
  actions={<>
    <Button variant="ghost" onClick={() => setOpen(false)}>Not yet</Button>
    <Button isDefault onClick={remove}>Delete</Button>
  </>}
>
  Backtests stay in the archive for 30 days.
</Dialog>

Props

PropTypeDefault
openbooleantrueRender or hide; pair with onClose.
titlestring | ReactNodeRequired
iconIconName—
actionsReactNode—
onClose() => void—Escape and backdrop click.
widthnumber | string420
inlinebooleanfalseRender in place, without backdrop.
childrenReactNode—
PreviousWindowNextScreen