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.
- Improve typesafety of createRestyleFunction for correct property values. #36 by @hammadj
- Add
start
andend
(e.g.paddingStart
) properties where applicable to better support RTL layouts. #38 by @salzhrani
- Improve type safety and type inference of
createVariant
,createBox
,createText
,useRestyle
,createRestyleFunction
andcreateRestyleComponent
. #16 and #21 by @hammadj, #26 by @Johan-duitot - Add a
createTheme
helper 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
createVariant
where defaults were only applied when the variant prop was passed in. #28 by @hammadj - Add a hook
useResponsiveProp
to deconstruct responsive prop values. #27 by @hammadj
- Public release
- Fix bug where
0
or other falsy values aren't allowed in the theme.
- Accept
children
by default in components created withcreateBox
andcreateText
.
- Fix a bug where
children
would always be a required prop increateRestyleComponent
.
- Rename library to
@shopify/restyle
- [BREAKING] Rename
useStyleSystem
touseRestyle
- [BREAKING] Rename
createStyleSystemFunction
tocreateRestyleFunction
- [BREAKING] Rename
createStyleSystemComponent
tocreateRestyleComponent
- Accept override component prop types in
createText
andcreateBox
.
- Accept optional underlying component to use in
createText
andcreateBox
.
- Fix component created with
createText
not accepting React NativeText
properties.
- 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
useTheme
to set the returned type, e.g.useTheme<Theme>()
- Added
shadow
style function tocreateBox
- Added
textShadow
style function tocreateText
- Map
shadowColor
andtextShadowColor
tocolors
theme key
- Added
defaults
parameter tocreateVariant
to 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