lion/packages/dialog/stories/styled-dialog-content.js
Thomas Rutten 2c9e71a328
chore(dialog): improve styled content docs (#633)
Co-Authored-By: Thomas Allmer <d4kmor@gmail.com>
Co-Authored-By: Joren Broekema <joren.broekema@gmail.com>
2020-03-11 16:48:05 +01: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);