diff --git a/packages/dialog/src/Dialog.ts b/packages/dialog/src/Dialog.ts
index 51c311fcc7..cbaf6d32ea 100644
--- a/packages/dialog/src/Dialog.ts
+++ b/packages/dialog/src/Dialog.ts
@@ -19,6 +19,7 @@ import {
query,
} from '@spectrum-web-components/base';
+import '@spectrum-web-components/rule/sp-rule.js';
import '@spectrum-web-components/button/sp-action-button.js';
import alertMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-alert-medium.css.js';
import crossLargeStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross-large.css.js';
@@ -36,10 +37,10 @@ import styles from './dialog.css.js';
*
* @fires close - Announces that the dialog has been closed.
*/
-export class Dialog extends ObserveSlotPresence(
- SpectrumElement,
- '[slot="footer"]'
-) {
+export class Dialog extends ObserveSlotPresence(SpectrumElement, [
+ '[slot="footer"]',
+ '[slot="button"]',
+]) {
public static get styles(): CSSResultArray {
return [styles, alertMediumStyles, crossLargeStyles];
}
@@ -51,18 +52,19 @@ export class Dialog extends ObserveSlotPresence(
public error = false;
@property({ type: Boolean, reflect: true })
- public dismissible = false;
+ public dismissable = false;
protected get hasFooter(): boolean {
- return this.slotContentIsPresent;
+ return this.getSlotContentPresence('[slot="footer"]');
+ }
+
+ protected get hasButtons(): boolean {
+ return this.getSlotContentPresence('[slot="button"]');
}
@property({ type: Boolean, reflect: true, attribute: 'no-divider' })
public noDivider = false;
- @property({ type: Boolean, reflect: true })
- public open = false;
-
@property({ type: String, reflect: true })
public mode?: 'fullscreen' | 'fullscreenTakeover';
@@ -92,7 +94,6 @@ export class Dialog extends ObserveSlotPresence(
}
public close(): void {
- this.open = false;
this.dispatchEvent(
new Event('close', {
bubbles: true,
@@ -102,17 +103,17 @@ export class Dialog extends ObserveSlotPresence(
protected render(): TemplateResult {
return html`
-