From fe2123bc5e4c35fc356aebc4cacfd9ead68b0ead Mon Sep 17 00:00:00 2001 From: Luke Walczak Date: Mon, 11 Dec 2017 23:06:39 +0100 Subject: [PATCH] fix: correct components using dark theme (#203) --- example/src/ToolbarExample.js | 17 +++++++++++++++-- src/components/Button.js | 23 +++++++++++++++++------ src/components/Divider.js | 31 ++++++++++++++++++++++++++----- src/components/Switch.js | 25 +++++++++++++++++-------- 4 files changed, 75 insertions(+), 21 deletions(-) diff --git a/example/src/ToolbarExample.js b/example/src/ToolbarExample.js index 2651a25..6eb9811 100644 --- a/example/src/ToolbarExample.js +++ b/example/src/ToolbarExample.js @@ -9,10 +9,13 @@ import { ToolbarContent, ToolbarAction, ToolbarBackAction, + withTheme, } from 'react-native-paper'; +import type { Theme } from 'react-native-paper/types'; type Props = { navigation: any, + theme: Theme, }; type State = { @@ -24,7 +27,7 @@ type State = { const MORE_ICON = Platform.OS === 'ios' ? 'more-horiz' : 'more-vert'; -export default class ToolbarExample extends React.Component { +class ToolbarExample extends React.Component { static title = 'Toolbar'; static navigationOptions = ({ navigation }) => { return { @@ -65,8 +68,16 @@ export default class ToolbarExample extends React.Component { showMoreIcon, showSubtitle, } = this.state; + const { theme: { colors: { background } } } = this.props; return ( - +