-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
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
All default rules lost? #41
Comments
@teddyteh here is what we're doing in an app we're currently building 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>
)
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
<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: