Repository navigation
|
Howdy 👋 I'm using cva with React, and I'm declaring my props like this. const buttonStyle = cva("...", {
variants: {
intent: { primary: "..." }
}
});
export interface ButtonProps
extends React.ComponentPropsWithoutRef<"button">,
Omit<VariantProps<typeof buttonStyle>, "class"> {}
export function Button({ className, intent, ...rest }: ButtonProps) {
return <button className={buttonStyle({ class: className, intent })} {...rest} />;
}VariantProps includes ClassProp I already have It's not a big issue, but I wanted to ask if you considered a version of VariantProps type without the Thank you and KUTGW :) |
Answered by
joe-bell
Jul 9, 2022
Replies: 1 comment 1 reply
|
Good question! I'd be up for removing it 🕺 |
1 reply
Answer selected by
joe-bell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good question! I'd be up for removing it 🕺