feat(button): add template hooks for before/after default slot
This commit is contained in:
parent
8d81f84ea9
commit
f478b988f8
1 changed files with 12 additions and 0 deletions
|
|
@ -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`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue