styled-components / babel-plugin-styled-components

Improve the debugging experience and add server-side rendering support to styled-components
MIT License
1.07k stars 141 forks source link

Add tricky expression on object expression #381

Closed healtheloper closed 1 year ago

healtheloper commented 2 years ago

except object key interpolation if property value is member expression

const ObjectInterpolationMember = p => {
  const theme = useTheme()
  const color = 'red'

  return (
    <p
      css={{
        color: theme.colors[color],
      }}
    >
      H
    </p>
  )
}
스크린샷 2023-04-06 오전 2 44 34
healtheloper commented 1 year ago

@probablyup 👀