mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-18 00:23:14 +00:00
3dba6cb284
various components for studio video style transfer --------- Co-authored-by: Victor <victor@storyteller.ai> Co-authored-by: Lee-Orr <lee-orr@users.noreply.github.com>
26 lines
783 B
TypeScript
26 lines
783 B
TypeScript
import { LitElement, type PropertyValues, html, nothing, unsafeCSS } from "lit";
|
|
import { customElement, property, state } from "lit/decorators.js";
|
|
|
|
import styles from "./tabs.element.scss?inline";
|
|
|
|
@customElement("sts-tabs")
|
|
export class Tabs extends LitElement {
|
|
static override styles = unsafeCSS(styles);
|
|
@property() name = "";
|
|
@property() onChange = (e: any) => {};
|
|
@property() tabs = [];
|
|
@property() value = "";
|
|
|
|
protected override render = () => html`
|
|
<ul class="studio-tabs">
|
|
${ this.tabs.map(({ label, value: itemValue },i) =>
|
|
html`<li
|
|
class=${ itemValue === this.value ? "selected-tab" : "" }
|
|
@click=${ ({ target }: any) => {
|
|
this.onChange({ target: { name: this.name, value: itemValue } });
|
|
} }
|
|
>${ label }</li>`
|
|
)}
|
|
</ul>
|
|
`
|
|
} |