Created
March 18, 2019 19:31
-
-
Save ajcrites/1eda9e7419e4d2ca924c892e2599b3a2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| @@ -9,8 +9,8 @@ export const ColorToolApp = () => { | |
| return ( | |
| <main> | |
| - <HexInput hex={hex} setHex={setHex} /> | |
| - <RgbaInput rgba={rgba} setRgba={setRgba} /> | |
| + <HexInput hex={hex} setHex={setHex} setRgba={setRgba} /> | |
| + <RgbaInput rgba={rgba} setRgba={setRgba} setHex={setHex} /> | |
| </main> | |
| ); | |
| }; | |
| @@ -1,8 +1,9 @@ | |
| import React from 'react'; | |
| -export const HexInput = ({ hex, setHex }) => { | |
| +export const HexInput = ({ hex, setHex, setRgba }) => { | |
| const onChange = ({ target: { value } }) => { | |
| setHex(value); | |
| + setRgba(value); | |
| }; | |
| return ( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment