Created
September 20, 2023 12:57
-
-
Save ivanovzhan/487b0828fb7cf7f5674a1e11e5787007 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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