lion/packages/dialog/docs/styled-dialog-content.js
Thomas Allmer bcd074d1fb feat: use markdown javascript (mdjs) for documentation
Co-authored-by: CubLion <alex.ghiu@ing.com>
2020-05-29 17:01:15 +02:00

38 lines
867 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { LitElement, html, css } from '@lion/core';
class StyledDialogContent extends LitElement {
static get styles() {
return [
css`
:host {
background-color: #fff;
}
.nice {
font-weight: bold;
color: green;
}
.close-button {
color: black;
font-size: 28px;
line-height: 28px;
}
`,
];
}
_closeOverlay() {
this.dispatchEvent(new Event('close-overlay', { bubbles: true }));
}
render() {
return html`
<div><p>Hello person who opened the dialog!</p></div>
<div>
<p>Look how nice this <span class="nice">dialog</span> looks!</p>
</div>
<button class="close-button" @click=${this._closeOverlay}></button>
`;
}
}
customElements.define('styled-dialog-content', StyledDialogContent);