Dialog

Modalne okna dialogowe i okna alertów z zarządzaniem fokusem, zamykaniem klawiszem Escape i kliknięciem tła.

Dostępny w
  • Angular: dostępny
  • Vue: dostępny
  • React: dostępny
  • React Native: dostępny

Użycie

Import

ts
import {
  SoneAlertDialogComponent,
  SoneDialogCloseComponent,
  SoneDialogComponent,
  SoneDialogDescriptionDirective,
  SoneDialogFooterDirective,
  SoneDialogHeaderDirective,
  SoneDialogMediaDirective,
  SoneDialogTitleDirective,
} from "@surface-one/angular/dialog";

Dokumentacja API

SoneAlertDialogComponentKomponent

Selektor
sone-alert-dialog
Wejścia
NazwaTyp Domyślnie
opendwukierunkowe

Shown or not, two-way: `[(open)]`. Leave it unbound to show the overlay while it is mounted (render it with `@if` and close it on `(dismiss)`).

boolean | undefinedundefined
dismissiblebooleantrue
showClosebooleantrue
closeLabel—$localize`:verb|Closes a dialog or sheet:Close`
ariaLabelstring | nullnull
size"xs" | "md""md"
Wyjścia
NazwaTyp
dismissvoid

SoneDialogCloseComponentKomponent

`button[soneDialogClose]` — a close button for a dialog or sheet header. Inside an overlay it closes it (when it may be dismissed) and the corner close steps aside. Project your own glyph to replace the default cross.

Selektor
button[soneDialogClose], button[soneSheetClose], button[soneDrawerClose]
Wejścia
NazwaTyp Domyślnie
label—$localize`:verb|Closes a dialog or sheet:Close`

SoneDialogComponentKomponent

Selektor
sone-dialog
Wejścia
NazwaTyp Domyślnie
opendwukierunkowe

Shown or not, two-way: `[(open)]`. Leave it unbound to show the overlay while it is mounted (render it with `@if` and close it on `(dismiss)`).

boolean | undefinedundefined
dismissiblebooleantrue
showClosebooleantrue
closeLabel—$localize`:verb|Closes a dialog or sheet:Close`
ariaLabelstring | nullnull
sizeDialogSize"sm"
scrimClosesbooleantrue
Wyjścia
NazwaTyp
dismissvoid

SoneDialogDescriptionDirectiveDyrektywa

Selektor
[soneDialogDescription], [soneSheetDescription], [soneDrawerDescription]
Wejścia
NazwaTyp Domyślnie
idstringsoneId("sone-dialog-description")

SoneDialogFooterDirectiveDyrektywa

Selektor
[soneDialogFooter], [soneSheetFooter], [soneDrawerFooter]

SoneDialogHeaderDirectiveDyrektywa

Selektor
[soneDialogHeader], [soneSheetHeader], [soneDrawerHeader]

SoneDialogMediaDirectiveDyrektywa

Selektor
[soneDialogMedia], [soneSheetMedia], [soneDrawerMedia]
Wejścia
NazwaTyp Domyślnie
toneDialogMediaTone"default"

SoneDialogTitleDirectiveDyrektywa

Selektor
[soneDialogTitle], [soneSheetTitle], [soneDrawerTitle]
Wejścia
NazwaTyp Domyślnie
idstringsoneId("sone-dialog-title")