Closed drokbers closed 2 months ago
changing types/react version with "18.2.42", solve the problem
Thanks for this. it worked
No no its not working there is no issue but the warning is still there
No no its not working there is no issue but the warning is still there
"@material-tailwind/react": "^2.1.4",
"next": "v13.5.7-canary.25",
"react": "^18",
"react-dom": "^18",
"devDependencies": {
"@types/jsonwebtoken": "^9.0.4",
"@types/node": "^20",
"@types/react": "18.2.42",
"@types/react-dom": "^18",
"autoprefixer": "^10",
"eslint": "^8",
"eslint-config-next": "13.5.6",
"postcss": "^8",
"tailwindcss": "^3",
"typescript": "^5"
}
Hi,
I've encountered an issue with the latest version of the Material-Tailwind library where TypeScript throws errors indicating that certain props are missing from the components, even when using them as documented. According to the TypeScript errors, props such as
placeholder
,onPointerEnterCapture
, andonPointerLeaveCapture
are missing from components likeTypography
,Button
,Card
, andTabsHeader
.I tried versions 2.1.9 and 2.1.4
For instance, when using the
Typography
component like so:TypeScript expects props that aren't typically required or documented, resulting in the following error:
Type '{ children: string; className: string; }' is missing the following properties from type 'Pick<TypographyProps, "id" | "children" | ... >': placeholder, onPointerEnterCapture, onPointerLeaveCapture
This issue is not isolated to Typography but extends to other components such as Button, Card, and TabsHeader, suggesting a broader issue with the TypeScript type definitions within the library.
Normally, these components don't require additional props for basic usage, as per the official documentation. This leads me to believe there might be an issue with the type definitions provided.
Could you please look into this? It's possible that the TypeScript definitions might need to be updated to reflect the actual required props for these components or to mark these additional props as optional if they are not intended to be mandatory.