Skip to content

Latest commit

 

History

History
93 lines (71 loc) · 2.41 KB

0.24.md

File metadata and controls

93 lines (71 loc) · 2.41 KB

Upgrade 0.23 to 0.24

Change startupjs and all @startupjs/* dependencies in your package.json to ^0.24.

DEPRECATIONS

UI configuration and overrides

  • Override ui configuration in startupjs.config.js is now deprecated. Your root styles file styles/index.styl should be used instead:
  $UI = merge($UI, {
    colors: {
      primary: #4a76a8,
      warning: #880000
    },
    Button: {
      heights: {
        xxl: 10u
      },
      outlinedBorderWidth: 2px
    }
  }, true)
  • When you want to have your ui configuration available in JS, use the newly added feature of exporting css to js:
// override from global config
$this = merge({
  bgColor: $UI.colors.primary,
  height: 10u
}, $UI.ShoppingCart, true)

.root
  height: $this.height
  background-color: $this.bgColor

:export
  config: $this
  colors: $UI.colors
  foobar: 42

Then import variables colors, config and foobar in the ShoppingCart/index.js file:

import { View } from 'react-native'
import STYLES from './index.styl'

const {
  config: { bgColor },
  colors,
  foobar
} = STYLES

export default function Button ({ text }) {
  console.log('Background color is:', bgColor)
  console.log('Available colors:', colors)
  console.log('Magic number FooBar:', foobar)
  return <View styleName='root' />
}

BREAKING CHANGES

Alert

  • Deprecated iconColor property is removed
  • Deprecated color property is removed. Use the variant property instead.

Button

  • For color property use color names from $UI.colors instead of passing hex color
  • Deprecated iconColor property is removed. Use iconStyleName instead
  • Deprecated textColor property is removed. Use textStyleName instead

Icon

  • Deprecated color property is removed. Use styleName instead

Loader

  • For color property use color names from $UI.colors instead of passing hex color

TextInput

  • Deprecated iconColor property is removed. Use iconStyleName instead

Span

  • Deprecated size property is removed. Use font() mixin in your StyleSheet

Tag

  • For color property use color names from $UI.colors instead of passing hex color
  • Deprecated iconColor property is removed. Use iconStyleName instead
  • Deprecated textColor property is removed. Use textStyleName instead

For full list of new features and bug fixes see CHANGELOG