How to create a generic Input when passing prop `class` to override styles?
Hi,
I'm trying to create a generic input. I'm using Tailwindcss for the styling with
I want to allow users to pass
I have this component:
Ant then I call the component like so
The problem here is that if I try to extract
Is there a way to pass a class or should I rename the prop as something else?
I'm trying to create a generic input. I'm using Tailwindcss for the styling with
cva (class-variance-authority) which allows me to create variants.I want to allow users to pass
class to override the input.I have this component:
Ant then I call the component like so
The problem here is that if I try to extract
class from props const { size, class, ...inputProps } = merged; I get an error: Unexpected keyword 'class'. I know that class is a reserved word in JavaScript. However, if I try to use className then I get this error: Property 'className' does not exist on type { ... };Is there a way to pass a class or should I rename the prop as something else?
