feat(button): add template hooks for before/after default slot

This commit is contained in:
Thomas Allmer 2019-07-25 15:06:11 +02:00 committed by Mikhail Bashkirov
parent 8d81f84ea9
commit f478b988f8

View file

@ -22,13 +22,25 @@ export class LionButton extends DelegateMixin(SlotMixin(LionLitElement)) {
render() { render() {
return html` return html`
<div class="btn"> <div class="btn">
${this._renderBefore()}
<slot></slot> <slot></slot>
${this._renderAfter()}
<slot name="_button"></slot> <slot name="_button"></slot>
<div class="click-area" @click="${this.__clickDelegationHandler}"></div> <div class="click-area" @click="${this.__clickDelegationHandler}"></div>
</div> </div>
`; `;
} }
// eslint-disable-next-line class-methods-use-this
_renderBefore() {
return html``;
}
// eslint-disable-next-line class-methods-use-this
_renderAfter() {
return html``;
}
static get styles() { static get styles() {
return [ return [
css` css`