magicui icon indicating copy to clipboard operation
magicui copied to clipboard

[bug]: /docs/components/meteors

Open XTurbo07 opened this issue 1 year ago • 2 comments

In tailwindcss.config nextjs + ts project its showing type error in this Code "metor" : { "0%": {transform: "rotate(215deg) translateX(0)", opacity: 1}, "70%": { opacity: 1 }, "100%": { transform: "rotate(215deg) translateX(-500px)", opacity: 0, }, }

The error is Type 'number' is not assignable to type 'string'

XTurbo07 avatar Jul 29 '24 17:07 XTurbo07

Hey @XTurbo07,

this issue is not particularly related to MagicUI itself.

The default tailwind.config file is written in JS so it doesn't check for type-safety. As of now, at least the keyframes property requires string values if you are using tailwind.config.ts.

This can easily be resolved in one of two ways:

  1. rename your tailwind.config.ts to tailwind.config.js or
  2. change the opacity to be of type string (just warp it in "")

Cheers, Julian

Julian-AT avatar Jul 30 '24 15:07 Julian-AT

Thank you for directing him in the right direction.

Thanks, Arghya

itsarghyadas avatar Aug 21 '24 07:08 itsarghyadas