What is the difference? #3239
Answered
by
segunadebayo
pharma-bros-lucas
asked this question in
Q&A
-
Hi I tried applying the style in two ways below. It works.
It doesn't work.
Can't I use the token function? What is the difference? I'm migrating template literals. Please help. |
Beta Was this translation helpful? Give feedback.
Answered by
segunadebayo
Apr 25, 2025
Replies: 1 comment 4 replies
-
You can effectively remove the const StyledTest = styled(Test, {
base: {
display: 'flex',
alignItems: 'center',
gap: '12px',
'& span': {
'&.line': {
- backgroundColor: token('colors.neutral.neutral6'),
+ backgroundColor: 'neutral.neutral6',
},
'&.description': {
textStyle: 'admin.typography.body.medium',
- color: token('colors.neutral.neutral6'),
+ color: 'neutral.neutral6',
},
},
},
}) |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
segunadebayo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can effectively remove the
token(...)
fns since you're using the object syntax.