Giter Club home page Giter Club logo

brise's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

brise's Issues

How to add onClick to a button?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.