render()

in src/confirm/confirm.tsx [48:91]


  render() {
    const {
      show,
      className,
      inProgress,
      cancelIsDefault,
      text,
      description,
      confirmLabel,
      rejectLabel,
      onConfirm,
      onReject,
      native,
    } = this.props;

    return (
      <Dialog
        label={text || (typeof description === 'string' ? description : undefined)}
        className={className}
        onEscPress={this.onEscPress}
        show={show}
        trapFocus
        data-test='ring-confirm'
        native={native}
      >
        {text && <Header>{text}</Header>}
        {description && <Content>{description}</Content>}
        <Panel>
          <Button
            data-test='confirm-ok-button'
            primary={!cancelIsDefault}
            loader={inProgress}
            disabled={inProgress}
            onClick={onConfirm}
          >
            {confirmLabel}
          </Button>
          <Button data-test='confirm-reject-button' onClick={onReject} disabled={inProgress} primary={cancelIsDefault}>
            {rejectLabel}
          </Button>
        </Panel>
      </Dialog>
    );
  }