All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and adheres to Semantic Versioning.
- Fixed: dist folder not being generated when building the project #302 by kelset
- Chore: Bump Node to 20 and allow releasing from GH Actions #312 by gvarandas
- Fixed: clean up the project configuration for RN0.71, aligning some packages to the right version #271 by kelset & tido64
- Added: Add layout props to createText function #262 by robrechtme
- Fixed: Variant with breakpoints memoizing separate values into the same hash key by deconstructing breakpoint objects into strings #241 by mattfrances
- Added: Missing typography properties from React Native's Text Style Props #249 by mattfrances
- Fixed: New property error when using
react-native-reanimatedv3.0.0by memoizing style values in a separateWeakMap#237 by fortmarek
- Renamed gap shorthands to be lowercase #218 by mlecoq
- Better TypeScript type support #216 by FranzMoreno & fortmarek
- Upgrade React Native to 0.71 in #207 by mattfrances
- Add support of gap properties in #188 by mlecoq
- Handle Pressable function style prop by CodyBrouwers in #138
- Fix default variant not being applied by nelyousfi in #148
- Fix incorrect props when empty breakpoints. #115 by @nelyousfi
- Improve rendering performance on breakpoint changes and re-renders. #113 by @omulet
- Updated React Native to 0.66 and fixed eslint issues. #117 by @davebcn87
- Export ThemeContext for outside use. #80 by @mohsinulhaq
- Fixing the example usages of createRestyleComponent in the README. #82 by @lucasstorti
- Fix ts error for useRestyle hook. #87 by @andre-krueger
- Improve web support with StyleSheet when creating styles. #94 by @yuriazevedo11
- Fix removeEventListener warning in rn0.65. #112 by @alexanderstrom
- Update outdated Polaris tokens link in README.md. #114 by @nelyousfi
- Add 2-dimensional breakpoints #70 by @Johan-duitot
- Silently ignore any errors caused by missing a variant definition in the theme (e.g. textVariants), to preserve backwards compatibility. #64 by @jonogreenz
- Disallow creating a variant with the existing base theme keys of
colors, spacing, breakpoints, zIndices, borderRadii. #64 by @jonogreenz - Improve rendering performance by removing unnecessary uses of the spread operator. #63 by @JoelBesada
Add a more descriptive error when theme is missing a key for a used variant.#59 by @Charly6596 (Replaced by PR #64)
- Add support for defining default values for variants in the theme. #51 by @Johan-duitot
- Improve typesafety of createRestyleFunction for correct property values. #36 by @hammadj
- Add
startandend(e.g.paddingStart) properties where applicable to better support RTL layouts. #38 by @salzhrani - Fix
useRestyletypes not accepting a function created bycreateVariants. #41 by @JoelBesada - Make
createRestyleComponent,createBoxandcreateTextcorrectly forward therefprop to the underlying component. #42 by @JoelBesada
- Improve type safety and type inference of
createVariant,createBox,createText,useRestyle,createRestyleFunctionandcreateRestyleComponent. #16 and #21 by @hammadj, #26 by @Johan-duitot - Add a
createThemehelper function to enforce proper shape for user themes. #18 by @hammadj - Add shorthand names for spacing and backgroundColor props. #22 by @hammadj
- Fix a bug in
createVariantwhere defaults were only applied when the variant prop was passed in. #28 by @hammadj - Add a hook
useResponsivePropto deconstruct responsive prop values. #27 by @hammadj
- Public release
- Fix bug where
0or other falsy values aren't allowed in the theme.
- Accept
childrenby default in components created withcreateBoxandcreateText.
- Fix a bug where
childrenwould always be a required prop increateRestyleComponent.
- Rename library to
@shopify/restyle - [BREAKING] Rename
useStyleSystemtouseRestyle - [BREAKING] Rename
createStyleSystemFunctiontocreateRestyleFunction - [BREAKING] Rename
createStyleSystemComponenttocreateRestyleComponent
- Accept override component prop types in
createTextandcreateBox.
- Accept optional underlying component to use in
createTextandcreateBox.
- Fix component created with
createTextnot accepting React NativeTextproperties.
- Removed component override prop, it's not really needed in practice and it makes managing the types much more complicated.
- Added optional type argument to
useThemeto set the returned type, e.g.useTheme<Theme>()
- Added
shadowstyle function tocreateBox - Added
textShadowstyle function tocreateText
- Map
shadowColorandtextShadowColortocolorstheme key
- Added
defaultsparameter tocreateVariantto set default values that should be applied before anything from the theme.
- Compile library without JSX
- Changed TypeScript compile target to
es5(instead ofesnext)
- Initial release