-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## Migrating from V2 | ||
|
||
**Color renames**. In line with the | ||
[upgrade guide](https://tailwindcss.com/docs/upgrade-guide#removed-color-aliases), | ||
tailwind v3 has mapped `green`, `yellow`, and `purple` to their extended colors. | ||
Additionally, | ||
[gray colors](https://tailwindcss.com/docs/upgrade-guide#renamed-gray-scales) were renamed | ||
in the extended colors to be more specific. Both of these can be resolved by following | ||
tailwind's upgrade guide and optionally re-aliasing the colors in your | ||
`tailwind.config.js`. | ||
|
||
Other than checking on any changes caused by color renames in tailwindcss, there are no | ||
breaking changes in V3 of this library, no further changes should be necessary. | ||
|
||
New v3 prefixes and classes are being added as we identify use cases. If you do have a | ||
feature that would help your development, please | ||
[open an issue](https://github.com/jaredh159/tailwind-react-native-classnames/issues/new) | ||
and include any libraries / hooks that could help someone in the community put a PR | ||
together. | ||
|
||
## Migrating from V1 | ||
|
||
**1.** During the rewrite, the package name on npm was changed to `twrnc`. To remove the | ||
old library and install v2, run: | ||
|
||
``` | ||
npm uninstall tailwind-react-native-classnames | ||
npm install twrnc | ||
``` | ||
|
||
**2.** Grep through your project replacing `from 'tailwind-react-native-classnames'` with | ||
`from 'twrnc'`. | ||
|
||
**3.** If you were using a `tailwind.config.js` you can `git rm` your `tw-rn-styles.json` | ||
file, and switch to passing your config directly to `create` as shown below: (details | ||
[here](#customization)) | ||
|
||
```js | ||
const tw = create(require(`../../tailwind.config.js`)); | ||
``` | ||
|
||
That's it! 🎉 The core API and functionality should work exactly the same from v1 to v2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters