Conversation
|
Maybe @trueadm would be interested in reviewing this PR? |
|
We’re about to introduce a few big changes. Let’s hold off merging for now |
Indeed, see Ripple-TS/ripple#236 |
content/4-component-composition/3-slot/ripple/FunnyButton.ripple
Outdated
Show resolved
Hide resolved
| if (@light === "red") { | ||
| <span>{"STOP"}</span> | ||
| } else if (@light === "orange") { | ||
| <span>{"SLOW DOWN"}</span> | ||
| } else if (@light === "green") { | ||
| <span>{"GO"}</span> | ||
| } |
There was a problem hiding this comment.
Not sure if pattern matching works for Ripple, but it would be a good use-case, especially since light should be an enum
| if (@light === "red") { | |
| <span>{"STOP"}</span> | |
| } else if (@light === "orange") { | |
| <span>{"SLOW DOWN"}</span> | |
| } else if (@light === "green") { | |
| <span>{"GO"}</span> | |
| } | |
| switch (@light) { | |
| case "red": | |
| <span>{"STOP"}</span> | |
| case "orange": | |
| <span>{"SLOW DOWN"}</span> | |
| case "green": | |
| <span>{"GO"}</span> | |
| } |
There was a problem hiding this comment.
switch statements arent implemented as of now, though they are planned :)
There was a problem hiding this comment.
Okay, thanks!
I couldn't find the tracker for it in https://github.com/trueadm/ripple/issues
There was a problem hiding this comment.
Thanks for the request for review!
However, I'm not sure everything is correct and according to Dominic's best practices and since he is already involved in this PR now I will gladly concede the review
this pr adds the Ripple framework
closes #298