Skip to content
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

Make the Switch to Dark Mode #12944

Merged
merged 7 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import {View, Pressable} from 'react-native';
import PropTypes from 'prop-types';
import styles from '../styles/styles';
import themeColors from '../styles/themes/default';
import stylePropTypes from '../styles/stylePropTypes';
import Icon from './Icon';
import * as Expensicons from './Icon/Expensicons';
Expand Down Expand Up @@ -112,7 +113,7 @@ class Checkbox extends React.Component {
this.state.isFocused && styles.borderColorFocus,
]}
>
<Icon src={Expensicons.Checkmark} fill="white" height={14} width={14} />
{this.props.isChecked && <Icon src={Expensicons.Checkmark} fill={themeColors.textLight} height={14} width={14} />}
</View>
)}
</Pressable>
Expand Down
2 changes: 1 addition & 1 deletion src/components/CustomStatusBar/index.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {StatusBar} from 'react-native';

export default class CustomStatusBar extends React.Component {
componentDidMount() {
StatusBar.setBarStyle('dark-content');
StatusBar.setBarStyle('light-content');
StatusBar.setBackgroundColor('transparent');
StatusBar.setTranslucent(true);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/CustomStatusBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {StatusBar} from 'react-native';

export default class CustomStatusBar extends React.Component {
componentDidMount() {
StatusBar.setBarStyle('dark-content', true);
StatusBar.setBarStyle('light-content', true);
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/FloatingMessageCounter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class FloatingMessageCounter extends PureComponent {
onPress={this.props.onClick}
ContentComponent={() => (
<View style={[styles.flexRow]}>
<Icon small src={Expensicons.DownArrow} fill={themeColors.textReversed} />
<Icon small src={Expensicons.DownArrow} fill={themeColors.textLight} />
<Text
selectable={false}
style={[
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/WorkspacesListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class WorkspacesListPage extends Component {
iconType: policy.avatar ? CONST.ICON_TYPE_AVATAR : CONST.ICON_TYPE_ICON,
action: () => Navigation.navigate(ROUTES.getWorkspaceInitialRoute(policy.id)),
iconStyles: policy.avatar ? [] : [styles.popoverMenuIconEmphasized],
iconFill: themeColors.iconReversed,
iconFill: themeColors.textLight,
fallbackIcon: Expensicons.FallbackWorkspaceAvatar,
brickRoadIndicator: PolicyUtils.getPolicyBrickRoadIndicatorStatus(policy, this.props.policyMembers),
pendingAction: policy.pendingAction,
Expand Down
2 changes: 1 addition & 1 deletion src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2150,7 +2150,7 @@ const styles = {
},

checkedContainer: {
backgroundColor: themeColors.link,
backgroundColor: themeColors.checkBox,
},

iouAmountText: {
Expand Down
5 changes: 4 additions & 1 deletion src/styles/themes/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ const darkTheme = {
placeholderText: colors.greenIcons,
heroCard: colors.blue,
uploadPreviewActivityIndicator: colors.greenHighlightBackground,
checkBox: colors.green,
};

// DEPRECATED THEME, Delete after successful rebranding.
Julesssss marked this conversation as resolved.
Show resolved Hide resolved
const oldTheme = {
shadow: colors.black,
link: colors.blue,
Expand Down Expand Up @@ -94,6 +96,7 @@ const oldTheme = {
heroCard: colors.blue,
uploadPreviewActivityIndicator: colors.gray1,
cardBG: colors.gray1,
checkBox: colors.blue,

// Merging new Keys for Dark Mode merge. Delete after new branding is implemented.
highlightBG: colors.gray1,
Expand All @@ -111,4 +114,4 @@ const oldTheme = {
textDark: colors.dark,
};

export default oldTheme;
export default darkTheme;