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() {
|
||||
return html`
|
||||
<div class="btn">
|
||||
${this._renderBefore()}
|
||||
<slot></slot>
|
||||
${this._renderAfter()}
|
||||
<slot name="_button"></slot>
|
||||
<div class="click-area" @click="${this.__clickDelegationHandler}"></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() {
|
||||
return [
|
||||
css`
|
||||
|
|
|
|||
Loading…
Reference in a new issue