ben-rogerson / twin.macro

🦹‍♂️ Twin blends the magic of Tailwind with the flexibility of css-in-js (emotion, styled-components, solid-styled-components, stitches and goober) at build time.
MIT License
7.92k stars 183 forks source link

Typings for `styled` not exported #709

Closed gausie closed 2 years ago

gausie commented 2 years ago
import tw, { styled } from "twin.macro";

Highlights that styled is an undefined export in TypeScript

ImBaedin commented 2 years ago

Have you setup the correct type file for your css-in-js library of choice? The "Get Started" section of the documentation has links to different examples. You're looking for one of the samples marked "ts".

You can then copy the "types/twin.d.ts" file into your project and that should take care of your error.