Encountered error while trying to customize theme
react": "15.4.2" native-base": "^2.0.5" react-native": "0.41.2"
Expected behaviour
Able to customize the theme.
Actual behaviour
Shows error undefined is not a function (evaluating '(0,_color2.default)(this.radioColor).darken(0.2).hexString()')
Steps to reproduce (code snippet or screenshot)
Follow the steps in the documentation: http://docs.nativebase.io/CUSTOMIZE.html#Theming_NativeBase_Apps
E.g.
import {Container, Content, Text} from 'native-base';
import React, {Component} from 'react-native';
import getTheme from './native-base-theme/components';
import material from './native-base-theme/variables/material';
export default class ThemeExample extends Component {
render() {
return (
<StyleProvider style={getTheme(material)}>
<Container>
<Content>
<Text>
I have changed the text color.
</Text>
</Content>
</Container>
</StyleProvider>
);
}
}
Screenshot of emulator/device

Is the bug present in both ios and android or in any one of them?
Both
You need to change hexString() to string()
And install npm install color -S
@RichardLindhout It works. Thanks.
Works for me as well. thanks!