@@ -4,12 +4,6 @@ import {classMap} from 'lit/directives/class-map.js';
44import { repeat } from 'lit/directives/repeat.js' ;
55import { animate , fadeOut , flyBelow } from '@lit-labs/motion' ;
66import { styles } from './styles.js' ;
7- import { TextField } from '@material/mwc-textfield' ;
8- import { Checkbox } from '@material/mwc-checkbox' ;
9- import '@material/mwc-textfield' ;
10- import '@material/mwc-button' ;
11- import '@material/mwc-checkbox' ;
12- import '@material/mwc-formfield' ;
137
148const data = [
159 { id : 1 , value : 'Go running.' , completed : false } ,
@@ -34,7 +28,7 @@ export class MotionTodos extends LitElement {
3428
3529 @property ( { type : Array } ) data = data ;
3630
37- @query ( 'mwc-textfield ' ) textField ! : TextField ;
31+ @query ( 'input[type="text"] ' ) textField ! : HTMLInputElement ;
3832
3933 addItem ( ) {
4034 if ( ! this . textField . value ) {
@@ -91,24 +85,22 @@ export class MotionTodos extends LitElement {
9185 skipInitial : true ,
9286 } ) }
9387 >
94- < mwc-formfield label ="${ item . id } . ${ item . value } "
95- > < mwc-checkbox
88+ < label >
89+ ${ item . id } . ${ item . value }
90+ < input
9691 type ="checkbox "
9792 ?checked =${ completed }
9893 @change =${ ( e : Event ) =>
99- this . updateItem ( item , ( e . target ! as Checkbox ) . checked ) }
100- > </ mwc-checkbox > </ mwc-formfield
101- > < button @click =${ ( ) => this . removeItem ( item ) } >
102- remove_circle_outline
103- </ button >
94+ this . updateItem ( item , ( e . target ! as HTMLInputElement ) . checked ) }
95+ > </ label > < button @click =${ ( ) => this . removeItem ( item ) } > x</ button >
10496 </ li > `
10597 ) }
10698 </ ul >
10799 </ div > ` ;
108100 return html `
109- < mwc-textfield outlined label ="Enter a todo... "> </ mwc-textfield >
101+ < input type =" text " placeholder ="Enter a todo... ">
110102 < div class ="controls ">
111- < mwc- button @click =${ this . addItem } raised > Add Todo</ mwc- button>
103+ < button @click =${ this . addItem } > Add Todo</ button >
112104 </ div >
113105 < div class ="lists "> ${ list ( ) } ${ list ( true ) } </ div >
114106 ` ;
0 commit comments