mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-26 02:23:21 +03:00
48 lines
896 B
Plaintext
48 lines
896 B
Plaintext
// Goal of this file is to re-create a TODO app from http://todomvc.com
|
|
|
|
// -- Entities
|
|
entity Task {
|
|
description :: string,
|
|
isDone :: boolean
|
|
}
|
|
|
|
// -- App and pages
|
|
app todoMVC {
|
|
title: "ToDo MVC"
|
|
}
|
|
|
|
page Main {
|
|
route: "/",
|
|
|
|
style: {=css
|
|
div {
|
|
color: green;
|
|
}
|
|
|
|
.mainContainer {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.taskListContainer {
|
|
width: 60%;
|
|
}
|
|
css=},
|
|
|
|
content: {=jsx
|
|
<div className="mainContainer">
|
|
<h1>todos</h1>
|
|
|
|
<TaskCreateForm
|
|
onCreate={task => this.props.addTask(task)}
|
|
submitButtonLabel={'Create new task'}
|
|
/>
|
|
|
|
<div className="taskListContainer">
|
|
<TaskList editable />
|
|
</div>
|
|
</div>
|
|
jsx=}
|
|
}
|