linaria icon indicating copy to clipboard operation
linaria copied to clipboard

Spreading Dynamic styles throws error

Open nilooy opened this issue 2 years ago • 0 comments

Environment

  • Linaria version:
    • "@linaria/core": "^4.2.10",
    • "@linaria/react": "^4.3.8",
  • Bundler (+ version): Next.js 13
  • Node.js version: Node 18
  • OS: Mac OS Ventura 13.2.1

Description

I wanted to spread the props in the react like this

I'm not quite sure if it's possible at the moment

const Component = styled.div`
  @media (max-width: 600px) {
    ${(props) => ({ ...props.mobile }) };
  }`

but if i do this it throws error Unknown word

Screenshot 2023-06-09 at 22 20 26 Screenshot 2023-06-09 at 22 20 44

nilooy avatar Jun 09 '23 20:06 nilooy