Created
March 18, 2019 19:50
-
-
Save ajcrites/f27c15e621f22daf84e4ced48e149636 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
@@ -1,6 +1,9 @@ | |
-import React from 'react'; | |
+import React, { useContext } from 'react'; | |
+import { ColorToolContext } from '~/ColorToolAppContext'; | |
+ | |
+export const HexInput = () => { | |
+ const { hex, setHex, setRgba } = useContext(ColorToolContext); | |
-export const HexInput = ({ hex, setHex, setRgba }) => { | |
const onChange = ({ target: { value } }) => { | |
setHex(value); | |
setRgba(value); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment