Skip to content

Instantly share code, notes, and snippets.

@ivanovzhan
Created September 20, 2023 12:57
Show Gist options
  • Save ivanovzhan/487b0828fb7cf7f5674a1e11e5787007 to your computer and use it in GitHub Desktop.
Save ivanovzhan/487b0828fb7cf7f5674a1e11e5787007 to your computer and use it in GitHub Desktop.
import '@yotpo-common/ui-components/components/list';
import '@yotpo-common/ui-components/components/list-item';
import '@yotpo-common/ui-components/components/list-label';
import { LitElement, html } from 'lit';
import { customElement, state } from 'lit/decorators.js';
@customElement('test-dropdown')
export class TestDropdown extends LitElement {
@state()
private checked: boolean = false;
constructor() {
super();
setInterval(() => {
console.log('interval');
this.checked != this.checked;
}, 1000);
}
override render() {
return html`
<yotpo-list>
<yotpo-list-item .checked=${this.checked} label="Test"></yotpo-list-item>
</yotpo-list>
`;
}
}
declare global {
interface HTMLElementTagNameMap {
'test-dropdown': TestDropdown
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment