Last active
May 22, 2019 18:45
-
-
Save DruRly/1ec88a172a4aab686499850b63871390 to your computer and use it in GitHub Desktop.
Color Theme Generator (Skateboard)
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 "./App.css" | |
const Color = props => { | |
return ( | |
<div style={{ backgroundColor: props.color }}> | |
<h1>{props.color}</h1> | |
</div> | |
) | |
} | |
const App = () => { | |
const randomColor = () => `#${(Math.random().toString(16) + "000000").substring(2, 8)}` | |
return ( | |
<div className="App"> | |
<Color color={randomColor()} /> | |
<Color color={randomColor()} /> | |
<Color color={randomColor()} /> | |
</div> | |
) | |
} | |
export default App |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment