joe-bell / cva

Class Variance Authority
https://cva.style
Apache License 2.0
5.46k stars 107 forks source link

Support generic type in intellisense #266

Closed doong-jo closed 4 months ago

doong-jo commented 4 months ago

Description

Support generic in Intellisense

["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],

👉

["cva(?:<[^>]*>)?([^)]*)", "[\"'`]([^\"'`]*).*?[\"'`]"],

AS-IS

iShot_2024-02-17_20 55 25

TO-BE

iShot_2024-02-17_20 55 52

Support non generic, generic both

image

Additional context


What is the purpose of this pull request?

Before submitting the PR, please make sure you do the following

vercel[bot] commented 4 months ago

@doong-jo is attempting to deploy a commit to the cva Team on Vercel.

A member of the Team first needs to authorize it.

joe-bell commented 4 months ago

Thanks for the PR, but I’m afraid cva isn’t designed to accept generic type — it’s merely intended for internal usage only! (this has been made clearer for v1)