Skip to content
New issue

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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: Why it's not possible to directly extend the VariantProps? #277

Closed
2 tasks done
jd-solanki opened this issue Jan 16, 2024 · 1 comment
Closed
2 tasks done

Comments

@jd-solanki
Copy link

Describe the feature

Hi 馃憢馃徎

I was learning how to use cva in Vue and noticed below code:

interface ButtonVariantProps extends VariantProps<typeof buttonVariants> {}

interface Props extends PrimitiveProps {
  variant?: ButtonVariantProps['variant']
  size?: ButtonVariantProps['size']
  as?: string
}

should be written like

// Let's ignore optional for now
interface Props extends PrimitiveProps {
	as?: string
}

So I tried it in fresh vue project and found that we get Vue type error:
image

Is anyone know what's causing this?

Additional information

  • I intend to submit a PR for this feature.
  • I have already implemented and/or tested this feature.
@sadeghbarati
Copy link
Collaborator

sadeghbarati commented Jan 16, 2024

Hi @jd-solanki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants