forked from matschik/component-party.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feedback: no space before method parens, no TS, else-if, ColorSelect …
…works now
- Loading branch information
Showing
8 changed files
with
26 additions
and
38 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
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,6 +1,6 @@ | ||
<let/time = new Date()/> | ||
<lifecycle | ||
onMount () { this.timer = setInterval(_ => time = new Date(), 1000) } | ||
onDestroy () { clearInterval(this.timer) } | ||
onMount() { this.timer = setInterval(_ => time = new Date(), 1000) } | ||
onDestroy() { clearInterval(this.timer) } | ||
/> | ||
<p>Current time: ${time.toLocaleTimeString()}</p> |
7 changes: 0 additions & 7 deletions
7
content/4-component-composition/1-props/marko/UserProfile.marko
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
5 changes: 0 additions & 5 deletions
5
content/4-component-composition/2-emit-to-parent/marko/AnswerButton.marko
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,2 @@ | ||
export interface Input { | ||
onYes: function; | ||
onNo: function; | ||
} | ||
|
||
<button onClick=input.onYes>YES</button> | ||
<button onClick=input.onNo>NO</button> |
4 changes: 2 additions & 2 deletions
4
content/4-component-composition/2-emit-to-parent/marko/App.marko
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,7 @@ | ||
<let/isHappy = true/> | ||
<p>Are you happy?</p> | ||
<AnswerButton | ||
onYes () { isHappy = true } | ||
onNo () { isHappy = false } | ||
onYes() { isHappy = true } | ||
onNo() { isHappy = false } | ||
/> | ||
<p style={ fontSize: 50 }>${isHappy ? "😀" : "😥"}</p> |
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