All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
2.1.1 (2021-08-08)
Note: Version bump only for package twind-jsx-preprocessor-monorepo
2.1.0 (2021-03-23)
- pass filename to preprocess, fixes error with source maps (1f05ad1)
- accept filename in options object (4b292c3)
2.0.4 (2021-03-13)
- work with babel tagged template transform (6d97d21)
2.0.3 (2021-03-08)
- react types: extend
Attributes
instead ofDOMAttributes
(098f305)
2.0.2 (2021-03-08)
Note: Version bump only for package twind-jsx-preprocessor-monorepo
2.0.1 (2021-03-08)
- add back reference to react tw prop types (1deafbc)
2.0.0 (2021-03-08)
- feat!: also transform to className on components (94ee419)
- I made a whole issue on this, but after some usage in practice, I believe transforming on all elements is the better DX. Here's why:
- In components, I had to write out logic for receiving both tw and className, and it's a lot simpler (and twind-agnostic in some cases) to only receive className
- This makes it easier to use with third-party libraries, especially with unstyled components, and with any component that accepts className (many of them!)
- Adding on the previous point, the mismatch of having to think about whether I can use
tw=
vs.className=
depending on what tag I'm using, I ended up making more mistakes in the middle of that, than if I could just usetw
everywhere
So, for migration, your components will not receive a tw
prop, but instead, will only receive className
in all cases. See the updated docs for how you should write overridable components
Hopefully this should be a small breaking change, and that this should make the prop nicer to use in the future!
1.0.1 (2021-03-05)
- only transform on host elements (549cac9)
- only add twind import if there were transformations (320f583)
- the tw call should use the locally imported name (0d79319)
- template string optimization (ff55328)