Live demo
Demo source
nv-dialogfooter shows a cancel button and a primary button in the dialog's
footer slot. Name them with cancelLabel and primaryLabel, and use
danger for destructive actions. Cancel emits dialogCanceled,
which closes an uncontrolled dialog; with controlled, close it in your
handler. The primary button emits dialogPrimaryClicked and leaves
closing to your application. disabled turns off only the primary button.
Anatomy
The dialog anatomy shows the footer and its actions below the body in the dialog composition.
Usage
Use specific action labels such as Save or Delete, and reserve danger for
a destructive primary action. leadingIcon and trailingIcon can support
that label. The default slot can replace the two-button layout; custom
buttons then need their own action and closing handlers. If dismissal is
unavailable, set the footer's undismissable too so it does not offer Cancel.
The dialog's undismissable does not block Cancel from a custom slotted footer.