-
Notifications
You must be signed in to change notification settings - Fork 988
Closed
Labels
Description
Environment
in codesandbox
- Operating System: Linux
- Node Version: v20.12.0
- Nuxt Version: 3.16.1
- CLI Version: 3.24.0
- Nitro Version: 2.11.8
- Package Manager: [email protected]
- Builder: -
- User Config: modules, devtools, compatibilityDate, future, css
- Runtime Modules: @nuxt/[email protected]
- Build Modules: -
Is this bug related to Nuxt or Vue?
Nuxt
Version
3.16.1
Reproduction
Description
The ui prop on Nuxt UI components (like UTable) is currently typed to only accept string values for its nested properties. However, the official documentation example for expandable table rows (https://ui.nuxt.com/components/table#with-expandable-rows) demonstrates using a string[] for customizing the button ui.leadingIcon property.
While using a string[] works correctly at runtime, it triggers a TypeScript error during development:
The relevant type definition should be updated:
export type PartialString<T> = {
[K in keyof T]?: string;
};Proposed Change:
import type { ClassValue } from 'tailwind-variants';
export type PartialString<T> = {
[K in keyof T]?: ClassValue;
};Additional context
No response
