Alert Dialog

A modal dialog that interrupts the user with important content and expects a response.

Installation

npx nx g @spartan-ng/cli:ui alert-dialog

Usage

import { BrnAlertDialogContentDirective, BrnAlertDialogTriggerDirective } from '@spartan-ng/brain/alert-dialog';
import {
  HlmAlertDialogActionButton
  HlmAlertDialogCancelButton
  HlmAlertDialog
  HlmAlertDialogContent
  HlmAlertDialogDescription
  HlmAlertDialogFooter
  HlmAlertDialogHeader
  HlmAlertDialogOverlay
  HlmAlertDialogTitle
} from '@spartan-ng/helm/alert-dialog';
<hlm-alert-dialog>
  <button id="edit-profile" variant="outline" brnAlertDialogTrigger hlmBtn>Show Dialog</button>
  <hlm-alert-dialog-content *brnAlertDialogContent="let ctx">
    <hlm-alert-dialog-header>
      <h2 hlmAlertDialogTitle>Are you absolutely sure?</h2>
      <p hlmAlertDialogDescription>
        This action cannot be undone. This will permanently delete your account and remove your data from our
        servers.
      </p>
    </hlm-alert-dialog-header>
    <hlm-alert-dialog-footer>
      <button hlmAlertDialogCancel (click)="ctx.close()">Cancel</button>
      <button hlmAlertDialogAction (click)="ctx.close()">Continue</button>
    </hlm-alert-dialog-footer>
  </hlm-alert-dialog-content>
</hlm-alert-dialog>

Brain API

BrnAlertDialogContent

Selector: [brnAlertDialogContent]

BrnAlertDialogDescription

Selector: [brnAlertDialogDescription]

BrnAlertDialogOverlay

Selector: brn-alert-dialog-overlay

BrnAlertDialogTitle

Selector: [brnAlertDialogTitle]

BrnAlertDialogTrigger

Selector: button[brnAlertDialogTrigger],button[brnAlertDialogTriggerFor]

Inputs

PropTypeDefaultDescription
brnAlertDialogTriggerFor BrnAlertDialog | undefined --
type 'button' | 'submit' | 'reset' button -

BrnAlertDialog

Selector: brn-alert-dialog

ExportAs: brnAlertDialog

Helm API

HlmAlertDialogActionButton

Selector: button[hlmAlertDialogAction]

HlmAlertDialogCancelButton

Selector: button[hlmAlertDialogCancel]

HlmAlertDialogContent

Selector: hlm-alert-dialog-content

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmAlertDialogDescription

Selector: [hlmAlertDialogDescription]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmAlertDialogFooter

Selector: hlm-alert-dialog-footer

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmAlertDialogHeader

Selector: hlm-alert-dialog-header

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmAlertDialogOverlay

Selector: [hlmAlertDialogOverlay],brn-alert-dialog-overlay[hlm]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmAlertDialogTitle

Selector: [hlmAlertDialogTitle]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmAlertDialog

Selector: hlm-alert-dialog

ExportAs: hlmAlertDialog

Aspect Ratio Alert