Change startupjs
and all @startupjs/*
dependencies in your package.json
to ^0.24
.
- Override ui configuration in
startupjs.config.js
is now deprecated. Your root styles filestyles/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' />
}
- Deprecated
iconColor
property is removed - Deprecated
color
property is removed. Use thevariant
property instead.
- For
color
property use color names from$UI.colors
instead of passing hex color - Deprecated
iconColor
property is removed. UseiconStyleName
instead - Deprecated
textColor
property is removed. UsetextStyleName
instead
- Deprecated
color
property is removed. UsestyleName
instead
- For
color
property use color names from$UI.colors
instead of passing hex color
- Deprecated
iconColor
property is removed. UseiconStyleName
instead
- Deprecated
size
property is removed. Usefont()
mixin in your StyleSheet
- For
color
property use color names from$UI.colors
instead of passing hex color - Deprecated
iconColor
property is removed. UseiconStyleName
instead - Deprecated
textColor
property is removed. UsetextStyleName
instead