Created
March 6, 2021 01:43
-
-
Save mosesoak/a5cd2addfce547914fda06ab6748e5b1 to your computer and use it in GitHub Desktop.
hideOutlineStyle state example
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
// the hook also provides a style object for convenience | |
const { hideOutlineStyle } = useTabOutline(); | |
// the `style` prop is used here for easy manipulation | |
<div className="contact-form-checkbox" style={hideOutlineStyle} /> | |
// the object is always defined, so spreading is always safe | |
<div | |
style={{ | |
...hideOutlineStyle, | |
backgroundColor: highlighted ? 'pink' : 'white', | |
}} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment