Add controls for live carousel.

This commit is contained in:
Dermot Duffy
2022-01-14 21:31:16 -08:00
parent c83299a2e6
commit 4a93d02fe9
6 changed files with 182 additions and 82 deletions
+9 -3
View File
@@ -8,8 +8,11 @@ import controlStyle from '../scss/next-previous-control.scss';
@customElement('frigate-card-next-previous-control')
export class FrigateCardNextPreviousControl extends LitElement {
@property({ attribute: true })
public title = '';
@property({ attribute: false })
protected direction?: 'next' | 'previous';
public direction?: 'next' | 'previous';
@property({ attribute: false })
set controlConfig(controlConfig: NextPreviousControlConfig | undefined) {
@@ -21,10 +24,13 @@ export class FrigateCardNextPreviousControl extends LitElement {
protected _controlConfig?: NextPreviousControlConfig;
@property({ attribute: false })
protected thumbnail?: string;
public thumbnail?: string;
@property({ attribute: true, type: Boolean })
public disabled = false;
protected render(): TemplateResult {
if (!this._controlConfig || this._controlConfig.style == 'none') {
if (this.disabled || !this._controlConfig || this._controlConfig.style == 'none') {
return html``;
}