Allow custom dialogs, better styling support.
Fix registration bug with tp-form.
This commit is contained in:
@@ -6,6 +6,14 @@ export class TpRtbBaseExtension extends LitElement {
|
||||
:host {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
slot::slotted(*) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:host([active]) slot::slotted(*) {
|
||||
--tp-icon-color: var(--tp-rtb-action-active-color, currentColor);
|
||||
}
|
||||
|
||||
button {
|
||||
margin: 0 2px;
|
||||
@@ -26,6 +34,16 @@ export class TpRtbBaseExtension extends LitElement {
|
||||
`;
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<slot @click=${this._handleClick}>
|
||||
<button type="button" class="${this.active ? 'active' : ''}" title=${this.label} aria-label=${this.label}>
|
||||
${this.label}
|
||||
</button>
|
||||
</slot>
|
||||
`;
|
||||
}
|
||||
|
||||
static get properties() {
|
||||
return {
|
||||
label: { type: String },
|
||||
@@ -39,14 +57,6 @@ export class TpRtbBaseExtension extends LitElement {
|
||||
this.active = false;
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<button class="${this.active ? 'active' : ''}" @click=${this._handleClick}>
|
||||
${this.label}
|
||||
</button>
|
||||
`;
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
this._findParentEditor();
|
||||
|
||||
Reference in New Issue
Block a user