-
-
Notifications
You must be signed in to change notification settings - Fork 270
Closed
Description
Description
When I use data-* attributes in createStyleContext defaultProps, it shows a type error. The rendered HTML output is correct, though.
My current workaround is using type assertion like this.
const TabsList = withContext(TabsPrimitive.List, 'list', {
defaultProps: {
'data-slot': 'tabs-list',
} as Partial<React.ComponentProps<typeof TabsPrimitive.List>>,
});Link to Reproduction
https://stackblitz.com/edit/vitejs-vite-1ebobrzk?file=src%2Fcomponents%2Fui%2Ftabs.tsx
Steps to reproduce
- Go to
src/components/ui/tabs.tsx - The type error appears in the
defaultProps
JS Framework
React (TS)
Panda CSS Version
1.4.3
Browser
No response
Operating System
- macOS
- Windows
- Linux
Additional Information
No response
Metadata
Metadata
Assignees
Labels
No labels