We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<StyleProvider style={theme}> <Screen> <NavigationBar styleName="inline" leftComponent={ <Button onPress={() => this.props.navigation.navigate("DrawerOpen")}> <Icon name="sidebar"/> </Button> } centerComponent={ <Title> {this.renderDate()} </Title> } rightComponent={ <Button onPress={() => this.setState({isTimelineOpen: true})}> <Icon name="history"/> </Button> } /> </Screen> </StyleProvider>
theme is an empty object, all default rules from shoutem ui seems to have lost. Any help?
The text was updated successfully, but these errors were encountered:
@teddyteh here is what we're doing in an app we're currently building it's pseudo code but I hope it helps get the general idea across
import { StyleProvider } from '@shoutem/theme' import { getTheme, defaultThemeVariables } from '@shoutem/ui' const customThemeVariables = { ...defaultThemeVariables, // override existing default theme variables primaryButtonBackgroundColor: 'red', secondaryButtonBackgroundColor: 'blue', // add new theme variables errorBlockColor: 'purple', } const customTheme = { // import the existing default theme definition ...getTheme(customThemeVariables), // add new theme definitions 'customApp.ui.ErrorBlock': { backgroundColor: customThemeVariables.errorBlockColor, }, } function App() { return ( <StyleProvider style={customTheme}> <CustomApp /> </StyleProvider> ) }
Sorry, something went wrong.
No branches or pull requests
<StyleProvider style={theme}> <Screen> <NavigationBar styleName="inline" leftComponent={ <Button onPress={() => this.props.navigation.navigate("DrawerOpen")}> <Icon name="sidebar"/> </Button> } centerComponent={ <Title> {this.renderDate()} </Title> } rightComponent={ <Button onPress={() => this.setState({isTimelineOpen: true})}> <Icon name="history"/> </Button> } /> </Screen> </StyleProvider>
theme is an empty object, all default rules from shoutem ui seems to have lost. Any help?
The text was updated successfully, but these errors were encountered: