@twind/macro
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

@twind/macro

A Babel macro which adds JSX enhancements for Twind

Features

Usage

  1. Add babel-plugin-macros to your Babel config (if you use Create React App, it's already installed!)

  2. Install:

    npm install -D @twind/macro
    
  3. Import to use:

    import '@twind/macro'
    
    const Button = (props) => (
      <button tw="bg-green-600 text-green-100 p-3 hover:bg-green-700 rounded" {...props} />
    )

Package Sidebar

Install

npm i @twind/macro

Weekly Downloads

4

Version

2.1.1

License

MIT

Unpacked Size

5.86 kB

Total Files

7

Last publish

Collaborators

  • sastan
  • itsmapleleaf