v0.0.7: Switched to lowercase decorators.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {defineElement, render, CustomElement, Host, State} from "../../../packages/csx";
|
||||
import {defineElement, render, CustomElement, Host, state} from "../../../packages/csx";
|
||||
|
||||
import style from './my-todo.scss';
|
||||
import {TodoInput} from './todo-input';
|
||||
@@ -7,7 +7,7 @@ import {TodoItem} from './todo-item';
|
||||
@defineElement('my-todo')
|
||||
export class MyTodo extends CustomElement{
|
||||
uid = 1;
|
||||
@State() todos = [
|
||||
@state() todos = [
|
||||
{id: this.uid++, text: "my initial todo", checked: false },
|
||||
{id: this.uid++, text: "Learn about Web Components", checked: false },
|
||||
];
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {defineElement, render, CustomElement, Host, State} from "../../../packages/csx";
|
||||
import {defineElement, render, CustomElement, Host, state} from "../../../packages/csx";
|
||||
import style from './todo-input.scss';
|
||||
|
||||
@defineElement('todo-input')
|
||||
export class TodoInput extends CustomElement{
|
||||
@State() value = "";
|
||||
@state() value = "";
|
||||
|
||||
render(){
|
||||
return (
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {defineElement, render, CustomElement, Host, ShadowDOM, State, Prop} from "../../../packages/csx";
|
||||
import {defineElement, render, CustomElement, Host, ShadowDOM, state, prop} from "../../../packages/csx";
|
||||
import style from './todo-item.scss';
|
||||
|
||||
@defineElement('todo-item')
|
||||
export class TodoItem extends CustomElement{
|
||||
@Prop({reflect: true}) checked = false;
|
||||
@Prop() model;
|
||||
@prop({reflect: true}) checked = false;
|
||||
@prop() model;
|
||||
|
||||
render(){
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user