Twitter2.2k

Alert Dialog

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

Installation

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

Usage

import { BrnAlertDialogImports } from '@spartan-ng/brain/alert-dialog';
import { HlmAlertDialogImports } from '@spartan-ng/helm/alert-dialog';
<hlm-alert-dialog>
  <button id="edit-profile" hlmAlertDialogTrigger>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: [brnAlertDialogOverlay],brn-alert-dialog-overlay

BrnAlertDialogTitle

Selector: [brnAlertDialogTitle]

BrnAlertDialogTrigger

Selector: button[brnAlertDialogTrigger],button[brnAlertDialogTriggerFor]

Inputs

PropTypeDefaultDescription
brnAlertDialogTriggerFor BrnAlertDialog | undefined --

BrnAlertDialog

Selector: [brnAlertDialog],brn-alert-dialog

ExportAs: brnAlertDialog

Helm API

HlmAlertDialogAction

Selector: button[hlmAlertDialogAction]

Inputs

PropTypeDefaultDescription
type 'button' | 'submit' | 'reset' button -

HlmAlertDialogCancel

Selector: button[hlmAlertDialogCancel]

Inputs

PropTypeDefaultDescription
type 'button' | 'submit' | 'reset' button -

HlmAlertDialogContent

Selector: [hlmAlertDialogContent],hlm-alert-dialog-content

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmAlertDialogDescription

Selector: [hlmAlertDialogDescription]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmAlertDialogFooter

Selector: [hlmAlertDialogFooter],hlm-alert-dialog-footer

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmAlertDialogHeader

Selector: [hlmAlertDialogHeader],hlm-alert-dialog-header

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmAlertDialogOverlay

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

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmAlertDialogTitle

Selector: [hlmAlertDialogTitle]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmAlertDialogTrigger

Selector: button[hlmAlertDialogTrigger],button[hlmAlertDialogTriggerFor]

HlmAlertDialog

Selector: hlm-alert-dialog

ExportAs: hlmAlertDialog

Aspect Ratio Alert