Skip to content

Releases: vivekmunde/react-native-stylo

1.1.0

28 Aug 14:32
Compare
Choose a tag to compare

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 by BackgroundColor.Screen.
  • Removed background colour definition BackgroundColor.Secondary. If you need it then, create the custom style definition for BackgroundColor.Secondary.

1.0.0

10 Jul 08:30
Compare
Choose a tag to compare
1.0.0