material-tailwind icon indicating copy to clipboard operation
material-tailwind copied to clipboard

The same as Type '{ children: Element[]; className: string; }' is missing the following properties from type 'Pick<MenuItemProps & ButtonHTMLAttributes<HTMLButtonElement>, "type" | "key" | "id" | "name" | "color" | "translate" | ... 262 more ... | "onResizeCapture">': nonce, onResize, onResizeCapture #379 with Typography, Card, CardHeader

Open michaelaboctario opened this issue 1 year ago • 5 comments

I have this: "dependencies": { "@heroicons/react": "^2.1.5", "@material-tailwind/react": "^2.1.10", "next": "14.2.13", "react": "^18.2.0", "react-dom": "^18" }, "devDependencies": { "@types/node": "^20", "@types/react": "^18.2.21", "@types/react-dom": "^18", "eslint": "^8", "eslint-config-next": "14.2.13", "postcss": "^8", "tailwindcss": "^3.4.1", "typescript": "^5.2.2" }

and .....

is doing

Type '{ children: string; color: "blue-gray"; className: string; }' is missing the following properties from type 'Pick<TypographyProps, "suppressHydrationWarning" | "className" | "color" | "id" | "lang" | "media" | "style" | "target" | "type" | "role" | "tabIndex" | "href" | ... 257 more ... | "ping">': placeholder, onPointerEnterCapture, onPointerLeaveCapture

Try to use MaterialTailwind with Nextjs.

michaelaboctario avatar Sep 23 '24 04:09 michaelaboctario

Hi, I suggest checking out discussion https://github.com/creativetimofficial/material-tailwind/issues/651 . You'll find several possible solutions there

Angelgamonal avatar Sep 26 '24 20:09 Angelgamonal

Hi, thanks you. As in discussion #651, using "@types/react": "18.2.39" works for me.

michaelaboctario avatar Sep 27 '24 08:09 michaelaboctario

+1 for "@types/react": "18.2.39" resolving the issue.

I had a newer version of @types/react (18.3.12) and had to downgrade to get rid of the error.

n-devr avatar Oct 24 '24 03:10 n-devr

I have this: "dependencies": { "@heroicons/react": "^2.1.5", "@material-tailwind/react": "^2.1.10", "next": "14.2.13", "react": "^18.2.0", "react-dom": "^18" }, "devDependencies": { "@types/node": "^20", "@types/react": "^18.2.21", "@types/react-dom": "^18", "eslint": "^8", "eslint-config-next": "14.2.13", "postcss": "^8", "tailwindcss": "^3.4.1", "typescript": "^5.2.2" }

and .....

is doing

Type '{ children: string; color: "blue-gray"; className: string; }' is missing the following properties from type 'Pick<TypographyProps, "suppressHydrationWarning" | "className" | "color" | "id" | "lang" | "media" | "style" | "target" | "type" | "role" | "tabIndex" | "href" | ... 257 more ... | "ping">': placeholder, onPointerEnterCapture, onPointerLeaveCapture

Try to use MaterialTailwind with Nextjs.

"devDependencies": {
   "@types/react": "^18.3.12",
},
"resolutions": {
   "@types/react": "18.2.39"
},

In my case i can use resolutions to fix error, so i can use both version (latest and 18.2.39) on my app

risqiromadhoni avatar Oct 25 '24 02:10 risqiromadhoni

i canot use in react v19

osenbal avatar Feb 23 '25 04:02 osenbal