Created
February 20, 2020 19:59
-
-
Save chrismatthieu/a075f186eecc8740fe76d33520187174 to your computer and use it in GitHub Desktop.
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
// | |
import React from 'react'; | |
import { View, Button } from 'magic-script-components'; | |
export default class MyApp extends React.Component { | |
constructor (props) { | |
super(props); | |
this.state = { | |
message: props.message | |
}; | |
} | |
render () { | |
return ( | |
<View name="main-view"> | |
<button | |
enabled=true | |
textColor='red' | |
textSize=0.08 | |
roundness=0.5 | |
width=0.0 | |
height=0.0 | |
onClick=updateBlink1('red') | |
>Red</button> | |
</View> | |
); | |
} | |
} | |
function updateBlink1(color){ | |
fetch("http://192.168.0.10:3000/" + color) | |
} |
grozdanov
commented
Feb 20, 2020
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment