-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert more elements to closure components
- Loading branch information
1 parent
0d4d6ac
commit f352abc
Showing
5 changed files
with
131 additions
and
124 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
import m from "mithril"; // eslint-disable-line no-unused-vars | ||
|
||
var Page = { | ||
view: (vnode) => | ||
m( | ||
"page", | ||
<div> | ||
<section class="section"> | ||
<div class="container"> | ||
<h1 class="title">{vnode.attrs.title}</h1> | ||
<h2 class="subtitle">{vnode.attrs.description}</h2> | ||
<div>{vnode.attrs.content}</div> | ||
</div> | ||
</section> | ||
</div> | ||
), | ||
var Page = () => { | ||
return { | ||
view: (vnode) => | ||
m( | ||
"page", | ||
<div> | ||
<section class="section"> | ||
<div class="container"> | ||
<h1 class="title">{vnode.attrs.title}</h1> | ||
<h2 class="subtitle">{vnode.attrs.description}</h2> | ||
<div>{vnode.attrs.content}</div> | ||
</div> | ||
</section> | ||
</div> | ||
), | ||
}; | ||
}; | ||
|
||
export default Page; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import m from "mithril"; // eslint-disable-line no-unused-vars | ||
|
||
var Block = { | ||
view: (vnode) => m("", <div>{vnode.children}</div>), | ||
var Block = () => { | ||
return { | ||
view: (vnode) => m("", <div>{vnode.children}</div>), | ||
}; | ||
}; | ||
|
||
export default Block; |
This file contains 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
This file contains 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