We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.4.6
I cannot use variant type string[] with extendVariants like code below:
'use client'; import { Button as BaseButton, extendVariants } from '@nextui-org/react'; const Button = extendVariants(BaseButton, { // Must define default variants before extending them defaultVariants: { size: 'md', variant: 'solid', color: 'default' }, compoundVariants: [ { variant: ['solid'], // <-- ERROR: Type 'string[]' is not assignable to type '"solid" | "bordered" | "light" | "flat" | "faded" | "shadow" | "ghost" | undefined'. color: 'default', class: 'text-white' } ], variants: { size: { sm: 'text-button-sm leading-button-sm h-fit rounded-sm px-14 py-6', md: 'text-button-md leading-button-md h-fit rounded-md px-20 py-8', lg: 'text-button-lg leading-button-lg h-fit rounded-lg px-26 py-11' } } }); export default Button;
But if I as any, it still works. Is this expected behavior?
No response
Just put the code and see typescript error
No typerscript error
Windows
Chrome
The text was updated successfully, but these errors were encountered:
ENG-1186 [BUG] - Typescript, extendVariants not allowed variant array
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
NextUI Version
2.4.6
Describe the bug
I cannot use variant type string[] with extendVariants like code below:
But if I as any, it still works. Is this expected behavior?
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Just put the code and see typescript error
Expected behavior
No typerscript error
Screenshots or Videos
No response
Operating System Version
Windows
Browser
Chrome
The text was updated successfully, but these errors were encountered: