pago / brise Goto Github PK
View Code? Open in Web Editor NEWReact Library for TailwindCSS, similar to styled-components
License: MIT License
React Library for TailwindCSS, similar to styled-components
License: MIT License
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.