Skip to content

Instantly share code, notes, and snippets.

@mosesoak
Created March 6, 2021 01:43
Show Gist options
  • Save mosesoak/a5cd2addfce547914fda06ab6748e5b1 to your computer and use it in GitHub Desktop.
Save mosesoak/a5cd2addfce547914fda06ab6748e5b1 to your computer and use it in GitHub Desktop.
hideOutlineStyle state example
// 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