Created
September 20, 2023 12:33
-
-
Save ivanovzhan/3a99348d5f20c48b83a4d8cf09b7cbc1 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 .checked=${this.checked}> | |
<yotpo-list-item 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