Can you access another component's css function? #2190
Unanswered
dungle-scrubs
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You are definitely not using Emotion like it is intended to. As to why it doesn't work - you'd have to share a runnable repro case of the problem but either way, this is not something we could recommend |
Beta Was this translation helpful? Give feedback.
1 reply
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
I think I'm trying to do something that might not work, but checking just in case. I have two different types of card components that all appear within the same parent component.
My goal is to have it such that both card components share the same "active" state. So I've created a global style in a separate file that looks something like this:
Then, I programmatically add the class name like this
I've also tried prepending
css-
.So I'm successfully adding the same generated class name across different components that otherwise would create their own unique class names if built inside the components. However, no css classes are actually applied.
I'm definitely missing something fundamental. Any ideas?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions