Using state to set styles #1425
Answered
by
atanasster
jenkshields
asked this question in
Q&A
-
Kia ora! I'm trying to use theme-ui and useState to implement a popover menu, and I'd love to double check syntax! Here's the line in particular:
Full code for context: Layout.js
burger.js
menu.js
|
Beta Was this translation helpful? Give feedback.
Answered by
atanasster
Jan 11, 2021
Replies: 1 comment 1 reply
-
@jenkshields you dont need to create a function inside the style, just pass a string. Something more like |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jenkshields
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jenkshields you dont need to create a function inside the style, just pass a string.
Something more like
transform: open ? 'translateX(0)' : 'translateX(-100%)'