old-ybbond

My old site that was written with ReactJS
Log | Files | Refs | README

commit 6049e38ae31024c29e75961a8a0d712480f85183
parent 3a54871c29506231c5d6b796e1ed56f86b984f56
Author: Yohanes Bandung <bandungpenting@gmail.com>
Date:   Mon,  9 Mar 2020 01:59:39 +0700

feature(theme): add colors constant

Diffstat:
Msrc/Theme/Style.js | 8+++++++-
Asrc/Theme/colors.js | 15+++++++++++++++

2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/src/Theme/Style.js b/src/Theme/Style.js
@@ -1,5 +1,6 @@
 // @flow
 import React from 'react';
+import {colors} from './colors';
 
 type Props = {
   dark: boolean,
@@ -10,7 +11,12 @@ const Style = (props: Props) => (
     dangerouslySetInnerHTML={{
       __html: `
 html {
-  background-color: ${props.dark ? '#1b1b1b' : '#fdfdfd'};
+  background-color: ${props.dark ? colors.dark : colors.light};
+}
+::selection {
+  background-color: ${
+    props.dark ? colors.darkSelection : colors.lightSelection
+  };
 }
       `,
     }}
diff --git a/src/Theme/colors.js b/src/Theme/colors.js
@@ -0,0 +1,15 @@
+// @flow
+
+const colors = {
+  dark: '#242424',
+  light: '#e3e0d7',
+  darkSelection: '#3e3e3e',
+  lightSelection: '#bdbcb6',
+  transparent: 'transparent',
+  linkLight: '#8dbfff',
+  linkDark: '#2585ff',
+  green: '#79d688',
+  darkGreen: '#257933',
+};
+
+export {colors};