-
Notifications
You must be signed in to change notification settings - Fork 880
/
index.ts
54 lines (48 loc) · 1.12 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* @license
* Copyright 2024 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
import {html, css, LitElement} from 'lit';
import {customElement} from 'lit/decorators.js';
import {provide, storeContext} from '@lit-labs/redux';
import {store} from './store.js';
import './my-counter.js';
import './count-incrementor.js';
import './count-display.js';
@customElement('my-app')
export class MyApp extends LitElement {
// Provide the Redux store in a context to any children of this component.
@provide({
context: storeContext,
})
_store = store;
render() {
return html`
<main>
<div>
<img alt="Lit Logo" src="/assets/lit.svg" />
<img alt="Redux Logo" src="/assets/redux.svg" />
</div>
<my-counter></my-counter>
<count-incrementor></count-incrementor>
<count-display></count-display>
</main>
`;
}
static styles = css`
:host {
font-size: 2rem;
}
main {
display: flex;
flex-direction: column;
align-items: center;
gap: 2rem;
}
img {
height: 150px;
width: 150px;
}
`;
}