Releases: nandorojo/dripsy
4.3.7
4.3.4
4.3.1
This version adds support for dot-path colors for gradient, text input, activity indicator, and more.
You can now do this:
const theme = {
colors: { $primary: { 100: 'red' } } }
}
//...
<Gradient
colors={['$primary.100']}
/>
And you will get proper autocomplete.
4.2
4.1: Dot Path Autocomplete
New Features
The following now has auto complete:
const theme = {
colors: { $blue: { 100: 'blue' } } }
}
// ...
return <View sx={{ color: '$blue.100' }} />
4.0.0
Fixes
This version adds major fixes for all type & autocomplete issues.
Addresses many issues, including: #274 #219 #260 #264 #276 #219. PR at #277
-
sx.variant
givesstring is not assignable to undefined
error - Field autocomplete stopped working
-
onlyAllowThemeValues
not working #264 -
alignItems: 'center'
doesn't autocomplete, butalignItems: ['center']
does #174 - Incorrect
TextInput
types #260 -
View.variant
gives plain string - Test
ref
- Pressable children type is weird
- Use theme values for
TextInput.placeholderTextColor
,ActivityIndicator.color
, and other related props. - Move
@dripsy/core
and@dripsy/gradient
intodripsy
- Customize shorthands in the theme
Breaking Changes
-
You must use TypeScript 5+. It was tested on on 5.0.2. While it's somewhat possible it could work on earlier versions, I don't plan on testing for earlier ones. I made this guide for using TS 5 with Expo SDK 48.
-
@dripsy/core
and@dripsy/gradient
have been removed in favor of a singledripsy
package. If you're using@dripsy/gradient
, please see the simple upgrade guide below.
Upgrade guide
First, upgrade Dripsy (and TypeScript):
yarn add dripsy
yarn add -D typescript
If, for some reason, you have any imports from @dripsy/core
, change those to dripsy
.
I recommend adding this to your .vscode/settings.json
too:
{
"typescript.tsdk": "node_modules/typescript/lib",
}
This instructs VSCode to use your repo's TypeScript version. I also set the TypeScript version as a resolution
to be safe in package.json
.
You may have to restart VSCode next.
Next.js Users
Remove @dripsy/core
and @dripsy/gradient
from your next.config.js
's transpiled packages.
@dripsy/gradient
users
Be sure to uninstall @dripsy/gradient
. Next, replace all imports from @dripsy/gradient
to dripsy/gradient
.
v3.8.0
3.7.2
Fixes
- Fix
gradient
andcolors
prop on@dripsy/gradient
, closing #80 #236 #204 #173expo-linear-gradient
is now a peer dependency you must install yourself
- General type fixes. The base theme now has
$1
,$2
, etc. as default theme values forspace
.- In v4, the default theme will be removed, so you will need to provide a
theme
to the provider.
- In v4, the default theme will be removed, so you will need to provide a
Full Changelog: v3.7.1...v3.7.2