-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hello, I am impressed with this library so I decided to give it a try.
I have the following code below to declare a button:
import { tw } from 'brise'
const Button = tw.button`
font-bold text-white
w-full p-2
bg-primary hover:bg-primary-hover
active:ring active:ring-purple-300
rounded
transition-colors
md:text-primary md:hover:text-primary-hover
md:bg-transparent md:hover:bg-transparent
md:w-auto md:p-0
`
Above works and it displays the intended styles correctly.
However when I try to add an onClick property, I get the following error from Typescript:
Type '{ children: string; onClick: () => void; }' is not assignable to type 'IntrinsicAttributes & { children?: ReactNode; }'.
Property 'onClick' does not exist on type 'IntrinsicAttributes & { children?: ReactNode; }'. TS2322
I've looked at the examples & demo but there doesn't seem to be any relevant info.
Can you please advise?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels