diff --git a/packages/core/src/components/go-dialog/go-dialog.tsx b/packages/core/src/components/go-dialog/go-dialog.tsx index 31377ea8..e78b2667 100644 --- a/packages/core/src/components/go-dialog/go-dialog.tsx +++ b/packages/core/src/components/go-dialog/go-dialog.tsx @@ -1,6 +1,5 @@ import { Component, h, Element, Prop, Method, Watch } from '@stencil/core'; import { uniqueId } from 'lodash-es'; -import { inheritAttributes } from '../../utils/helper'; @Component({ tag: 'go-dialog', @@ -28,12 +27,6 @@ export class GoDialog { overlayEl: HTMLElement; - // Store attributes inherited from the host element - private inheritedAttrs = {}; - componentWillLoad() { - this.inheritedAttrs = inheritAttributes(this.el, ['class', 'style']); - } - @Method() async close() { this.active = false; @@ -59,7 +52,7 @@ export class GoDialog { } render() { - const { active, heading, persistent, headingId, inheritedAttrs } = this; + const { active, heading, persistent, headingId } = this; return ( (this.overlayEl = el)} - onOverlayClose={() => this.handleOverlayClose()} - {...inheritedAttrs}> + onOverlayClose={() => this.handleOverlayClose()}>

{heading}

{!persistent ? ( - this.close()}> + this.close()} + aria-label="Close dialog"> - Close ) : null}
diff --git a/packages/core/src/index.html b/packages/core/src/index.html index 80b274cd..43e45957 100644 --- a/packages/core/src/index.html +++ b/packages/core/src/index.html @@ -1,6 +1,6 @@ - + @@ -21,6 +21,15 @@ + + +

demo

+

+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem quidem aut laudantium sint perspiciatis fugit, + quos voluptatum facilis. Delectus fugiat deserunt cumque adipisci alias voluptates, atque facere beatae + aspernatur nihil! +

+