Add Et2Dropdown, just a wrapper around SlDropdown

This commit is contained in:
nathan 2024-12-05 08:22:39 -07:00
parent 021f780548
commit a6002f24f0
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,25 @@
import {Et2Widget} from "../../Et2Widget/Et2Widget";
import {SlDropdown} from "@shoelace-style/shoelace";
import {customElement} from "lit/decorators/custom-element.js";
import {css} from "lit";
@customElement("et2-dropdown")
export class Et2Dropdown extends Et2Widget(SlDropdown)
{
static get styles()
{
return [
...super.styles,
css`
:host {
max-width: fit-content;
}
.dropdown--open .dropdown__panel {
background-color: var(--sl-panel-background-color);
padding: var(--sl-spacing-medium);
}
`
];
}
}

View File

@ -24,6 +24,7 @@ import '../jsapi/egw_json.js';
import {egwIsMobile} from "../egw_action/egw_action_common";
import './Layout/Et2Box/Et2Box';
import './Layout/Et2Details/Et2Details';
import './Layout/Et2Dropdown/Et2Dropdown';
import './Layout/Et2Groupbox/Et2Groupbox';
import './Layout/Et2Tabs/Et2Tab';
import './Layout/Et2Tabs/Et2Tabs';