Skip to content

Commit

Permalink
Make dark mode colors more align with mac defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
robertying committed May 6, 2020
1 parent c1e2747 commit caf640b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/components/AutoHeightWebView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ import {
WebViewMessageEvent,
WebViewNavigation,
} from 'react-native-webview/lib/WebViewTypes';
import DeviceInfo from '../constants/DeviceInfo';

const injectedScript = `
${
DeviceInfo.isMac()
? 'document.body.style.backgroundColor = "rgb(30,30,30)"'
: ''
}
function waitForBridge() {
if (!window.ReactNativeWebView.postMessage) {
setTimeout(waitForBridge, 200);
Expand Down
6 changes: 3 additions & 3 deletions src/constants/Colors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import DeviceInfo from './DeviceInfo';

const colorsDark = {
background: 'black',
background: DeviceInfo.isMac() ? 'rgb(30,30,30)' : 'black',
foreground: 'white',
gray: 'rgb(152,152,157)',
yellow: 'rgb(255,214,10)',
Expand Down Expand Up @@ -27,7 +29,5 @@ const system = (name: keyof typeof colorsDark, colorScheme?: string) => {
export default {
theme: 'rgba(102,8,116,1)',
lightTheme: 'rgba(102,8,116,0.6)',
// background: '#f0f0f0',
// placeholder: '#eeeeee',
system,
};

0 comments on commit caf640b

Please sign in to comment.