Add a toggle component
This commit is contained in:
parent
92553cb1f1
commit
6e2dfa1cf1
5 changed files with 165 additions and 3 deletions
|
|
@ -26,10 +26,13 @@ export function StyledShadowElement(Base) {
|
|||
/** @type {ShadowRoot} */
|
||||
_shadow;
|
||||
|
||||
constructor() {
|
||||
constructor({focusable = false} = {}) {
|
||||
super();
|
||||
|
||||
this._shadow = this.attachShadow({ mode: `open` });
|
||||
this._shadow = this.attachShadow({
|
||||
mode: `open`,
|
||||
delegatesFocus: focusable,
|
||||
});
|
||||
this._style = document.createElement(`style`);
|
||||
this._shadow.appendChild(this._style);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue