Releases: vivekmunde/react-native-stylo
Releases · vivekmunde/react-native-stylo
1.1.0
Release notes
- Stylo’s Default Theme
- Light & Dark theme variants
- More strongly typed theme definitions
- Each theme file now returns a function instead of style object. The function accepts variables as an argument.
// 1.0.0
import _BackgroundColorStyles from '../__generated__/generic/background-color-styles';
const BackgroundColorStyles = _BackgroundColorStyles;
export default BackgroundColorStyles;
// 1.1.0
import { StyleSheet, ViewStyle } from 'react-native';
import { TBackgroundColorStyle, TVariable } from '../../types';
import _getBackgroundColorStyles from '../__generated__/generic/background-color-styles';
const getBackgroundColorStyles = (variables: Record<TVariable, string | number>) => (
StyleSheet.create<Record<TBackgroundColorStyle, ViewStyle>>({
..._getBackgroundColorStyles(variables),
})
);
export default getBackgroundColorStyles;
- ThemeProvider now has strongly typed props
- New background colour definitions added:
BackgroundColor.Transparent
,BackgroundColor.Screen
- Background colour definitions removed:
BackgroundColor.Body
,BackgroundColor.Secondary
Breaking changes
- Background colour definition
BackgroundColor.Body
was replaced byBackgroundColor.Screen
. - Removed background colour definition
BackgroundColor.Secondary
. If you need it then, create the custom style definition forBackgroundColor.Secondary
.
1.0.0
1.0.0