From 2090467b574798cbe06166065e3929b30f70037a Mon Sep 17 00:00:00 2001 From: Shubham Date: Thu, 21 Oct 2021 18:17:22 +0530 Subject: [PATCH 01/16] Add css variables for dark mode --- components/Auction/Auction.module.css | 4 +- components/Auction/new.module.css | 13 ++++-- components/NavBar/navbar.module.css | 3 ++ components/coins-status/coin.module.css | 2 +- .../custom-button/custom-button.style.js | 11 ++--- .../exchange-rate-row.module.css | 2 +- components/filter/filter.module.css | 4 +- components/stock-card/index.js | 4 +- .../stock-operation.module.css | 6 ++- .../transaction-chart.module.css | 4 +- .../transaction-details.module.css | 4 +- .../transaction-operation.module.css | 6 ++- public/assets/filter-icon-dark.svg | 45 +++++++++++++++++++ styles/Home.module.css | 8 ++-- styles/globals.css | 6 +-- 15 files changed, 91 insertions(+), 31 deletions(-) create mode 100644 public/assets/filter-icon-dark.svg diff --git a/components/Auction/Auction.module.css b/components/Auction/Auction.module.css index 9184538..fb80861 100644 --- a/components/Auction/Auction.module.css +++ b/components/Auction/Auction.module.css @@ -25,10 +25,10 @@ .auctionContainer { display: flex; width: 70%; - background-color: rgb(245, 235, 235); + background-color: var(--colorAuctionBackground); justify-content: space-around; align-items: center; - border: 1px solid #f4f4f4; + border: 1px solid var(--colorBackgroundLight); border-radius: 20px; box-shadow: 0 0 15px - 7px rgba(0, 0, 0, 0.65); margin-bottom: 20px; diff --git a/components/Auction/new.module.css b/components/Auction/new.module.css index f4b69a4..fbf9e41 100644 --- a/components/Auction/new.module.css +++ b/components/Auction/new.module.css @@ -7,16 +7,18 @@ display: flex; padding: 5% 10%; flex-direction: column; - border: 1px solid #f4f4f4; + border: 1px solid var(--colorBackgroundMedium); border-radius: 20px; box-shadow: 0 0 15px -7px rgba(0,0,0,.65); width: 40%; - background-color: white; + background-color: var(--colorBackgroundMedium); overflow-x: hidden; } .inputBox, .submitBtn { - border: 0.5px solid #ccc; + border: 0.5px solid var(--colorAuctionInput); + background-color: var(--colorBackgroundDark); + color: var(--colorWhite); border-radius: 5px; padding: 10px; padding-left: 10px; @@ -25,10 +27,15 @@ width: 100%; } +.inputBox:disabled{ + background-color: var(--colorBackgroundLight); +} + .submitBtn { cursor: pointer; background-color: rgb(27, 199, 27); color: white; + border-color: var(--colorBackgroundMedium); } .submitBtn:hover { diff --git a/components/NavBar/navbar.module.css b/components/NavBar/navbar.module.css index ab9ab6e..b79d368 100644 --- a/components/NavBar/navbar.module.css +++ b/components/NavBar/navbar.module.css @@ -30,6 +30,9 @@ margin: 10px 0 5px 10px; cursor: pointer; } +.darkTheme { + padding: 14px 16px; +} .profilePic { display: none; diff --git a/components/coins-status/coin.module.css b/components/coins-status/coin.module.css index 08d86e3..0355d8e 100644 --- a/components/coins-status/coin.module.css +++ b/components/coins-status/coin.module.css @@ -26,7 +26,7 @@ padding: 10px 5px 2px 5px; margin-bottom: 8px; margin-left: 20px; - background-color: white; + background-color: var(--colorBackgroundMedium); } .coinData { display: flex; diff --git a/components/custom-button/custom-button.style.js b/components/custom-button/custom-button.style.js index fa5964b..96024cf 100644 --- a/components/custom-button/custom-button.style.js +++ b/components/custom-button/custom-button.style.js @@ -18,14 +18,14 @@ const InvertedButtonStles = css` const primaryStyle = css` -webkit-transition: background 0.2s; /* For Safari 3.0 to 6.0 */ - background-color: #ee1a75; /* For modern browsers */ - border: 1px solid white; + background-color: var(--colorButtonPink); /* For modern browsers */ + border: 1px solid var(--colorButtonBorder); color: white; transition: background 0.2s; &:hover { - background: white; - border: 1px solid #ee1a75; - color: #ee1a75; + background: var(--colorBackgroundLight); + border: 1px solid var(--colorButtonPink); + color: var(--colorButtonPink); } `; const BaseButtonStyles = css` @@ -47,6 +47,7 @@ const selectButton = (props) => { return props.inverted ? InvertedButtonStles : BaseButtonStyles; }; +// console.log(selectButton(props)); export const CustomButtonContainer = styled.button` border-radius: 6px; cursor: pointer; diff --git a/components/exchange-rate-row/exchange-rate-row.module.css b/components/exchange-rate-row/exchange-rate-row.module.css index cb4d28d..fb712e0 100644 --- a/components/exchange-rate-row/exchange-rate-row.module.css +++ b/components/exchange-rate-row/exchange-rate-row.module.css @@ -2,7 +2,7 @@ font-weight: 500; display: flex; justify-content: space-between; - background-color: aliceblue; + background-color: var(--colorExchangeBackground); margin: 5px; padding: 5px; border-radius: 6px; diff --git a/components/filter/filter.module.css b/components/filter/filter.module.css index 141a2df..43f341f 100644 --- a/components/filter/filter.module.css +++ b/components/filter/filter.module.css @@ -8,11 +8,11 @@ .showList li { list-style-type: none; padding: 7px; - background-color: #fff; + background-color: var(--colorBackgroundLight); } .showList li:hover { - background-color: #bdc3c7; + background-color: var(--colorFilterHover); } .showList { diff --git a/components/stock-card/index.js b/components/stock-card/index.js index 1a9e96a..c65ffcd 100644 --- a/components/stock-card/index.js +++ b/components/stock-card/index.js @@ -63,7 +63,7 @@ export const Card = ({ stock, operationType }) => { min-width: 300px; border-radius: 4px; transition: 0.2s; - background: #ffffff; + background: var(--colorBackgroundMedium); } .stock-card:hover { box-shadow: 0px 4px 10px #ccc; @@ -77,7 +77,7 @@ export const Card = ({ stock, operationType }) => { text-align: center; width: 100%; padding: 1rem; - background-color: #ffffff; + background-color: var(--colorBackgroundMedium); } .stock-card-product-name { diff --git a/components/stock-operation-modal/stock-operation.module.css b/components/stock-operation-modal/stock-operation.module.css index f8ca7e6..33d441c 100644 --- a/components/stock-operation-modal/stock-operation.module.css +++ b/components/stock-operation-modal/stock-operation.module.css @@ -13,7 +13,7 @@ .modalWrapper { position: fixed; z-index: 100; - background: white; + background: var(--colorBackgroundMedium); border-radius: 10px; padding: 20px 20px; width: 40%; @@ -50,7 +50,7 @@ .label { font-weight: bold; margin: 0.5rem 0; - color: #464646; + color: var(--colorStockLablel); } .select { @@ -61,6 +61,8 @@ border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; + background-color: var(--colorBackgroundDark); + color: var(--colorWhite); } .closedButton { diff --git a/components/transaction-chart/transaction-chart.module.css b/components/transaction-chart/transaction-chart.module.css index d76785a..cce0df7 100644 --- a/components/transaction-chart/transaction-chart.module.css +++ b/components/transaction-chart/transaction-chart.module.css @@ -2,8 +2,8 @@ display: flex; justify-content: center; width: calc(50em/2); - background-color: #fdfbfb; - border: 1px solid #f4f1f1; + background-color: var(--colorChartBackground); + border: 1px solid var(--colorChartBorder); cursor: pointer; font-size: 20px; } diff --git a/components/transaction-details/transaction-details.module.css b/components/transaction-details/transaction-details.module.css index 3e7412d..839f794 100644 --- a/components/transaction-details/transaction-details.module.css +++ b/components/transaction-details/transaction-details.module.css @@ -10,8 +10,8 @@ justify-content: flex-start; flex-wrap: wrap; width: 100%; - border-top: 1px solid #f0e2e7; - border-bottom: 1px solid #f0e2e7;; + border-top: 1px solid var(--colorBorder); + border-bottom: 1px solid var(--colorBorder); cursor: pointer; height:6em; font-size: 17px; diff --git a/components/transaction-operation/transaction-operation.module.css b/components/transaction-operation/transaction-operation.module.css index 709df7c..6f27b9c 100644 --- a/components/transaction-operation/transaction-operation.module.css +++ b/components/transaction-operation/transaction-operation.module.css @@ -13,7 +13,7 @@ .modalWrapper { position: fixed; z-index: 100; - background: white; + background: var(--colorBackgroundMedium); border-radius: 10px; padding: 32px 24px; width: 40%; @@ -50,7 +50,7 @@ .label { font-weight: bold; margin: 0.5rem 0; - color: #464646; + color: var(--colorStockLablel); } .select { @@ -61,6 +61,8 @@ border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; + background-color: var(--colorBackgroundDark); + color: var(--colorWhite); } .closedButton { diff --git a/public/assets/filter-icon-dark.svg b/public/assets/filter-icon-dark.svg new file mode 100644 index 0000000..a720cba --- /dev/null +++ b/public/assets/filter-icon-dark.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/styles/Home.module.css b/styles/Home.module.css index 67b5735..c691749 100644 --- a/styles/Home.module.css +++ b/styles/Home.module.css @@ -24,20 +24,20 @@ width: 7rem; } .greenButton { - background-color: #2ecc71; + background-color: var(--colorButtonGreen); text-align: center; border: none; } .redButton { - background-color: #ff3838; + background-color: var(--colorButtonRed); text-align: center; border: none; } .card { - border: 1px solid #f4f4f4; + border: 1px solid var(--colorBorder2); border-radius: 5px; padding: 1px; - background: white; + background: var(--colorBackgroundLight); font-size: 20px; margin-top: 10px; } diff --git a/styles/globals.css b/styles/globals.css index a960f36..de4e4d7 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -1,11 +1,11 @@ -html, body { padding: 0; margin: 0; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; - background-color: #e9ebff;; + background-color: var(--colorBodyBackground); min-height: 100%; + color: var(--colorText); } @media only screen and (min-width: 905px) { html, @@ -21,7 +21,7 @@ a { box-sizing: border-box; } .text-gray { - color: #363636; + color: var(--colorText); } .card { margin: 10px; From cc85be4561516393842a90945afca8126f2ca9a0 Mon Sep 17 00:00:00 2001 From: Shubham Date: Thu, 21 Oct 2021 18:18:10 +0530 Subject: [PATCH 02/16] Add icons for dark mode --- public/assets/moon.png | Bin 0 -> 15504 bytes public/assets/sun.png | Bin 0 -> 7256 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 public/assets/moon.png create mode 100644 public/assets/sun.png diff --git a/public/assets/moon.png b/public/assets/moon.png new file mode 100644 index 0000000000000000000000000000000000000000..30396f9a600d9aa356c798ccd41519a5b0dd9d59 GIT binary patch literal 15504 zcmX9_cRZEv`+tnGBF8K%4k1EWWv`PWdnH0f_DZ&7CC7-5>^&+W%HE@7%PLzaWMuEn z?>gUKuUG#(=kYxEbKTc?U+?#Ihia(ZB`0MdMG%Bs=^jQ4LGZG1|B27TmG@*#P6)z^ zC}HGuJX2RDNIWCv4`tRRgp!tzc%m_Sqqpqnia+F*>)J|~J;)#Y(Pu8!*3TlNJNR0- zoJN&TH%#wig;wa*cq&Y&h?x==v+Fx~wo?|frA|`v{kzas&)zemYRd1=g%Zb0C!%7J z*e|`k>b6gwyiZ6-;9Bp&M-cI*!9iU??``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-`W~99w_z=5u z5g&oIcpcap;S5gOB7iIwY*mm&Od_u3ap&Vvn?L$A#hcwlHlS1RV%# zrLNT2XN(4Jan`6|h|^yM+yq)Uy2;@52a`ZIV+=*2*EI2-DHz}eRVxK#U4y!fJ$W?%{K_({|hgm`sA=xhB=VlLhcQ;5Lu)fy1qAqcj(9FGchA>wswcg|kg`;|Ms zI9km_?1a@a>EvtE-CS~8wR*o*>_d>66??Nn{VGz*!u@?8P0wdNjoOXx|7rD@toN#( z_dO8e2G#vn8d+pfp?-si#Ebjltl!8O)$ Date: Thu, 21 Oct 2021 18:19:56 +0530 Subject: [PATCH 03/16] Add Dark-Theme and dark-theme-icon components --- components/Dark-Theme/Themes.js | 42 +++++++++++++++++++ components/Dark-Theme/globalStyles.js | 20 +++++++++ components/Dark-Theme/useDarkMode.js | 31 ++++++++++++++ .../dark-theme-icon/dark-mode.module.css | 5 +++ components/dark-theme-icon/index.js | 20 +++++++++ stores/dark-mode-context.js | 41 ++++++++++++++++++ 6 files changed, 159 insertions(+) create mode 100644 components/Dark-Theme/Themes.js create mode 100644 components/Dark-Theme/globalStyles.js create mode 100644 components/Dark-Theme/useDarkMode.js create mode 100644 components/dark-theme-icon/dark-mode.module.css create mode 100644 components/dark-theme-icon/index.js create mode 100644 stores/dark-mode-context.js diff --git a/components/Dark-Theme/Themes.js b/components/Dark-Theme/Themes.js new file mode 100644 index 0000000..742c1d5 --- /dev/null +++ b/components/Dark-Theme/Themes.js @@ -0,0 +1,42 @@ +export const lightTheme = { + colorBackgroundLight: '#f4f4f4', + colorBackgroundMedium: '#f4f4f4', + colorBackgroundDark: '#f4f4f4', + colorExchangeBackground: 'aliceblue', + colorBodyBackground: '#e9ebff', + colorText: '#363636', + colorBorder: '#f0e2e7', + colorBorder2: '#f4f4f4', + colorButtonGreen: '#2ecc71', + colorButtonRed: '#ff3838', + colorButtonPink: '#ee1a75', + colorButtonBorder: 'white', + colorFilterHover: '#bdc3c7', + colorAuctionBackground: 'rgb(245, 235, 235)', + colorWhite: 'black', + colorAuctionInput: '#ccc', + colorStockLablel: '#464646', + colorChartBackground: 'white', + colorChartBorder: 'white', +}; +export const darkTheme = { + colorBackgroundLight: '#27262D', + colorBackgroundMedium: '#1D1C22', + colorBackgroundDark: '#0e0e11', + colorExchangeBackground: 'var(--colorBackgroundMedium)', + colorBodyBackground: 'var(--colorBackgroundLight)', + colorText: '#E1E1EC', + colorBorder: 'rgb(76, 39, 52)', + colorBorder2: 'rgb(51, 55, 57)', + colorButtonGreen: '#1d8147', + colorButtonRed: '#9e0000', + colorButtonPink: '#c70f5f', + colorButtonBorder: 'var(--colorButtonPink)', + colorFilterHover: '#3a3f42', + colorAuctionBackground: '#2e1717', + colorWhite: '#fff', + colorAuctionInput: 'white', + colorStockLablel: 'var(--colorWhite)', + colorChartBackground: '#241212', + colorChartBorder: '#34383a', +}; diff --git a/components/Dark-Theme/globalStyles.js b/components/Dark-Theme/globalStyles.js new file mode 100644 index 0000000..5020e4e --- /dev/null +++ b/components/Dark-Theme/globalStyles.js @@ -0,0 +1,20 @@ +import { createGlobalStyle } from 'styled-components'; + +const GlobalStyles = createGlobalStyle` + :root{ + ${({ theme }) => { + let s = ``; + for (var prop in theme) { + if (prop in theme) { + s += `--${prop}: ${theme[prop]};`; + } + } + return s; + }} + } + body{ + transition: all 0.50s linear; + } + `; + +export default GlobalStyles; diff --git a/components/Dark-Theme/useDarkMode.js b/components/Dark-Theme/useDarkMode.js new file mode 100644 index 0000000..4224640 --- /dev/null +++ b/components/Dark-Theme/useDarkMode.js @@ -0,0 +1,31 @@ +import { useEffect, useState } from 'react'; +import { lightTheme, darkTheme } from '@components/Dark-Theme/Themes'; + +export const useDarkMode = () => { + const [theme, setTheme] = useState('light'); + const [themeData, setThemeData] = useState(lightTheme); + const [mountedComponent, setMountedComponent] = useState(false); + const setMode = (mode) => { + window.localStorage.setItem('theme', mode); + setTheme(mode); + const themeMode = mode === 'light' ? lightTheme : darkTheme; + setThemeData(themeMode); + }; + + const themeToggler = () => { + const toggle = theme === 'light' ? setMode('dark') : setMode('light'); + return toggle; + }; + + useEffect(() => { + const localTheme = window.localStorage.getItem('theme'); + const themeMode = localTheme === 'light' ? lightTheme : darkTheme; + if (localTheme) { + setTheme(localTheme); + setThemeData(themeMode); + } + setMountedComponent(true); + console.log('here'); + }, []); + return [theme, themeData, themeToggler, mountedComponent]; +}; diff --git a/components/dark-theme-icon/dark-mode.module.css b/components/dark-theme-icon/dark-mode.module.css new file mode 100644 index 0000000..68e244a --- /dev/null +++ b/components/dark-theme-icon/dark-mode.module.css @@ -0,0 +1,5 @@ +.container img { + width: 20px; + height: 20px; + cursor: pointer; +} diff --git a/components/dark-theme-icon/index.js b/components/dark-theme-icon/index.js new file mode 100644 index 0000000..02d7c36 --- /dev/null +++ b/components/dark-theme-icon/index.js @@ -0,0 +1,20 @@ +import React from 'react'; +import classNames from './dark-mode.module.css'; + +function DarkThemeIcon({ theme, themeToggleHandler }) { + return ( +
+ {theme === 'light' ? ( + moon + ) : ( + sun + )} +
+ ); +} + +export default DarkThemeIcon; diff --git a/stores/dark-mode-context.js b/stores/dark-mode-context.js new file mode 100644 index 0000000..c7de137 --- /dev/null +++ b/stores/dark-mode-context.js @@ -0,0 +1,41 @@ +/* eslint-disable react-hooks/rules-of-hooks */ +import { createContext, useContext } from 'react'; +import { useDarkMode } from '@components/Dark-Theme/useDarkMode'; + +const DarkModeContext = createContext(); + +export function DarkModeProvider({ children }) { + const [theme, themeData, themeToggler, mountedComponent] = useDarkMode(); + + let sharedState = [theme, themeData, themeToggler, mountedComponent]; + + return ( + + {children} + + ); +} + +export function useDarkModeContext() { + // console.log(DarkModeContext); + return useContext(DarkModeContext); +} + +// const DarkModeContext = createContext({useDarkMode()}); + +// export const DarkModeProvider = ({ children }) => { +// const [theme, themeToggler] = useDarkMode(); +// return ( +// +// {children} +// +// ); +// }; + +// export const darkModeContext = () => { +// const context = useContext(DarkModeContext); // this needs to be changed +// if (!context) +// throw new Error(`darkModeContext context can only +// be used in a component wrapped with DarkModeContext`); +// return context; +// }; From 8802689c77130fd8063766d943eec8e7da3109e4 Mon Sep 17 00:00:00 2001 From: Shubham Date: Thu, 21 Oct 2021 18:21:46 +0530 Subject: [PATCH 04/16] Changes in pages and components for dark theme --- components/NavBar/index.js | 6 ++ components/filter/index.js | 8 ++- pages/_app.js | 9 ++- pages/auction/index.js | 47 ++++++++++---- pages/auction/new.js | 47 +++++++++----- pages/currency-exchange/index.js | 40 ++++++++---- pages/index.js | 83 +++++++++++++++---------- pages/trading/index.js | 89 +++++++++++++++------------ pages/trading/sell.js | 101 ++++++++++++++++++------------- 9 files changed, 277 insertions(+), 153 deletions(-) diff --git a/components/NavBar/index.js b/components/NavBar/index.js index 447807f..8fbc575 100644 --- a/components/NavBar/index.js +++ b/components/NavBar/index.js @@ -3,8 +3,11 @@ import React, { useState, useRef } from 'react'; import styles from './navbar.module.css'; import Image from 'next/image'; import GenericClosePopUp from '../Close-popup/GenericClosePopUp'; +import DarkThemeIcon from '../dark-theme-icon/index'; +import { useDarkModeContext } from 'stores/dark-mode-context'; const NavBar = ({ personData: { photo } }) => { + const [theme, themeData, themeToggler] = useDarkModeContext(); const RDSLogo = '/assets/Real-Dev-Squad1x.png'; const [toggle, setToggle] = useState(false); const navbarRef = useRef(); @@ -43,6 +46,9 @@ const NavBar = ({ personData: { photo } }) => { +
+ +
{ + const [theme, themeData, themeToggler] = useDarkModeContext(); const { changeTransactions } = props; const [toggle, setToggle] = useState(false); const filterRef = useRef(); @@ -20,7 +22,11 @@ const Filter = (props) => { >
Filter icon ; +const MyApp = ({ Component, pageProps }) => { + return ( + + + + ); +}; export default wrapper.withRedux(MyApp); diff --git a/pages/auction/index.js b/pages/auction/index.js index 4022eca..1f84db9 100644 --- a/pages/auction/index.js +++ b/pages/auction/index.js @@ -5,23 +5,44 @@ import { Footer } from '@components/footer'; import Head from 'next/head'; import HandleAuctions from '@components/Auction'; import styles from '@components/Auction/Auction.module.css'; +import GlobalStyles from '@components/Dark-Theme/globalStyles'; +import { ThemeProvider } from 'styled-components'; +import { useDarkModeContext } from 'stores/dark-mode-context'; const Auctions = () => { + const [ + theme, + themeData, + themeToggler, + mountedComponent, + ] = useDarkModeContext(); + + if (!mountedComponent) return
; return ( -
- - Auction | Crypto - - - - -
- + + <> + +
+ + Auction | Crypto + + + + +
+ +
+ + +
- - -
-
+ + ); }; diff --git a/pages/auction/new.js b/pages/auction/new.js index d1a0c03..0cb4601 100644 --- a/pages/auction/new.js +++ b/pages/auction/new.js @@ -5,23 +5,42 @@ import { Footer } from '@components/footer'; import Head from 'next/head'; import CreateNewAuction from '@components/Auction/createNewAuction'; import styles from '@components/Auction/Auction.module.css'; +import GlobalStyles from '@components/Dark-Theme/globalStyles'; +import { ThemeProvider } from 'styled-components'; +import { useDarkModeContext } from 'stores/dark-mode-context'; const NewAuction = () => { + const [ + theme, + themeData, + themeToggler, + mountedComponent, + ] = useDarkModeContext(); + + if (!mountedComponent) return
; return ( -
- - Create New Auction | Crypto - - - - - -

Go Back

-
- - -
-
+ + <> + +
+ + Create New Auction | Crypto + + + + + +

Go Back

+
+ + +
+
+ +
); }; diff --git a/pages/currency-exchange/index.js b/pages/currency-exchange/index.js index 852956e..6ad1bb0 100644 --- a/pages/currency-exchange/index.js +++ b/pages/currency-exchange/index.js @@ -5,20 +5,36 @@ import NavBar from '@components/NavBar'; import ExchageRaterow from '@components/exchange-rate-row'; import exchageRates from 'mock/exchange-rates'; import styles from './currency-exchange.module.css'; +import GlobalStyles from '@components/Dark-Theme/globalStyles'; +import { ThemeProvider } from 'styled-components'; +import { useDarkModeContext } from 'stores/dark-mode-context'; export default function Bank() { const { exchange_rates } = styles; + const [ + theme, + themeData, + themeToggler, + mountedComponent, + ] = useDarkModeContext(); + + if (!mountedComponent) return
; return ( -
- - Currency Exchange - - - -
- {exchageRates.map((row) => ( - - ))} -
-
+ + <> + +
+ + Currency Exchange + + + +
+ {exchageRates.map((row) => ( + + ))} +
+
+ +
); } diff --git a/pages/index.js b/pages/index.js index 5bc012e..b930a93 100644 --- a/pages/index.js +++ b/pages/index.js @@ -12,45 +12,62 @@ import TransactionOperationModal from '@components/transaction-operation-modal'; import NavBar from '@components/NavBar'; import CustomButton from 'components/custom-button'; import { useRouter } from 'next/router'; +import GlobalStyles from '@components/Dark-Theme/globalStyles'; +import { ThemeProvider } from 'styled-components'; +import { useDarkModeContext } from 'stores/dark-mode-context'; export default function Home() { const router = useRouter(); + const [ + theme, + themeData, + themeToggler, + mountedComponent, + ] = useDarkModeContext(); + if (!mountedComponent) return
; return ( -
- - Bank Dashboard - - - -
-
-
- - -
-
-
- router.push('/currency-exchange')} - buttonPrimary - > - Go to currency Exchange - -
-
-
- + + <> + +
+ + Bank Dashboard + + + +
+
+
+ +
-
-
-
-

Latest Transactions

+
+ router.push('/currency-exchange')} + buttonPrimary + > + Go to currency Exchange + +
+
+
+ +
+
+
+
+
+

Latest Transactions

+
+ +
- -
+
+
- -
-
+ + ); } diff --git a/pages/trading/index.js b/pages/trading/index.js index 474fff8..db682eb 100644 --- a/pages/trading/index.js +++ b/pages/trading/index.js @@ -7,10 +7,19 @@ import NavBar from '@components/NavBar'; import Link from 'next/link'; import { getStocks } from '../../redux/action'; import styles from '../../styles/Home.module.css'; +import GlobalStyles from '@components/Dark-Theme/globalStyles'; +import { ThemeProvider } from 'styled-components'; +import { useDarkModeContext } from 'stores/dark-mode-context'; const Invest = () => { const stocks = useSelector((state) => state.stocksDetails.stocks); const dispatch = useDispatch(); + const [ + theme, + themeData, + themeToggler, + mountedComponent, + ] = useDarkModeContext(); useEffect(() => { const fetchData = async () => { @@ -21,48 +30,52 @@ const Invest = () => { fetchData(); }, []); + if (!mountedComponent) return
; return ( - <> - -
-
-
-
- {stocks.map((itemName) => ( - - ))} -
-
- -
Sell Stocks
- + + <> + + +
+
+
+
+ {stocks.map((itemName) => ( + + ))} +
+
+ +
Sell Stocks
+ +
+
-
-
- -
- + .content { + min-height: 87vh; + padding-bottom: 75px; + } + .shoppinglist-container { + display: flex; + flex-wrap: wrap; + justify-content: space-evenly; + align-items: stretch; + } + `} +
+ + ); }; diff --git a/pages/trading/sell.js b/pages/trading/sell.js index 2191f04..dd26716 100644 --- a/pages/trading/sell.js +++ b/pages/trading/sell.js @@ -7,6 +7,9 @@ import { Card } from '@components/stock-card'; import Link from 'next/link'; import { getUserStocks } from '../../redux/action'; import styles from '../../styles/Home.module.css'; +import GlobalStyles from '@components/Dark-Theme/globalStyles'; +import { ThemeProvider } from 'styled-components'; +import { useDarkModeContext } from 'stores/dark-mode-context'; const SellStocks = () => { const userStocksData = useSelector( @@ -14,6 +17,12 @@ const SellStocks = () => { ); const userStocks = userStocksData.stocks; const dispatch = useDispatch(); + const [ + theme, + themeData, + themeToggler, + mountedComponent, + ] = useDarkModeContext(); useEffect(() => { const fetchData = async () => { @@ -24,13 +33,19 @@ const SellStocks = () => { fetchData(); }, []); + if (!mountedComponent) return
; const showAlert = () => { return ( -
- - Please log in to continue! - -
+ + <> + +
+ + Please log in to continue! + +
+ +
); }; @@ -41,45 +56,49 @@ const SellStocks = () => { )); const NO_STOCKS_MESSAGE = "You don't have any stocks yet. Click below to buy some"; + if (!mountedComponent) return
; return ( - <> - -
-
- {userStocksData.isLoggedIn && ( -
-
- {availableStocks.length ? availableStocks : NO_STOCKS_MESSAGE} + + <> + + +
+
+ {userStocksData.isLoggedIn && ( +
+
+ {availableStocks.length ? availableStocks : NO_STOCKS_MESSAGE} +
+
+ +
Buy Stocks
+ +
-
- -
Buy Stocks
- -
-
- )} -
{!userStocksData.isLoggedIn && showAlert()}
-
-
- -
- + .content { + min-height: 87vh; + padding-bottom: 75px; + } + .shoppinglist-container { + display: flex; + flex-wrap: wrap; + justify-content: space-evenly; + align-items: stretch; + } + `} +
+ + ); }; From 92c43176028f627ceba81039bbc8b81ec8e2ff05 Mon Sep 17 00:00:00 2001 From: Shubham Date: Thu, 21 Oct 2021 18:29:48 +0530 Subject: [PATCH 05/16] Changes in dark mode context --- stores/dark-mode-context.js | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/stores/dark-mode-context.js b/stores/dark-mode-context.js index c7de137..4317578 100644 --- a/stores/dark-mode-context.js +++ b/stores/dark-mode-context.js @@ -17,25 +17,13 @@ export function DarkModeProvider({ children }) { } export function useDarkModeContext() { - // console.log(DarkModeContext); - return useContext(DarkModeContext); -} - -// const DarkModeContext = createContext({useDarkMode()}); + const state = useContext(DarkModeContext); -// export const DarkModeProvider = ({ children }) => { -// const [theme, themeToggler] = useDarkMode(); -// return ( -// -// {children} -// -// ); -// }; + if (state === undefined) { + throw new Error( + 'useDarkModeContext must be used within a DarkModeProvider' + ); + } -// export const darkModeContext = () => { -// const context = useContext(DarkModeContext); // this needs to be changed -// if (!context) -// throw new Error(`darkModeContext context can only -// be used in a component wrapped with DarkModeContext`); -// return context; -// }; + return state; +} From ca990d86d7c31240d9796c31b4e653615fbb031f Mon Sep 17 00:00:00 2001 From: Shubham Date: Sat, 23 Oct 2021 19:35:07 +0530 Subject: [PATCH 06/16] Fix dark mode for mobile version --- components/Dark-Theme/Themes.js | 2 ++ components/stock-card/index.js | 4 ++-- components/stock-operation-modal/stock-operation.module.css | 2 +- .../transaction-operation/transaction-operation.module.css | 2 +- styles/Home.module.css | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/Dark-Theme/Themes.js b/components/Dark-Theme/Themes.js index 742c1d5..8b4294e 100644 --- a/components/Dark-Theme/Themes.js +++ b/components/Dark-Theme/Themes.js @@ -18,6 +18,7 @@ export const lightTheme = { colorStockLablel: '#464646', colorChartBackground: 'white', colorChartBorder: 'white', + colorStockText: '#540075', }; export const darkTheme = { colorBackgroundLight: '#27262D', @@ -39,4 +40,5 @@ export const darkTheme = { colorStockLablel: 'var(--colorWhite)', colorChartBackground: '#241212', colorChartBorder: '#34383a', + colorStockText: '#cf56ff', }; diff --git a/components/stock-card/index.js b/components/stock-card/index.js index c65ffcd..97dd5e0 100644 --- a/components/stock-card/index.js +++ b/components/stock-card/index.js @@ -83,7 +83,7 @@ export const Card = ({ stock, operationType }) => { .stock-card-product-name { font-weight: bold; font-size: 1.3em; - color: #540075; + color: var(--colorStockText); } p { margin-block-start: 0.5rem; @@ -96,7 +96,7 @@ export const Card = ({ stock, operationType }) => { } .stock-card-product-quantity { font-size: 1.3em; - color: #540075; + color: var(--colorStockText); } `} diff --git a/components/stock-operation-modal/stock-operation.module.css b/components/stock-operation-modal/stock-operation.module.css index 33d441c..6dd3346 100644 --- a/components/stock-operation-modal/stock-operation.module.css +++ b/components/stock-operation-modal/stock-operation.module.css @@ -98,7 +98,7 @@ .modalWrapper { position: fixed; z-index: 100; - background: white; + background: var(--colorBackgroundMedium); border-radius: 10px; padding: 20px 10px; width: 80%; diff --git a/components/transaction-operation/transaction-operation.module.css b/components/transaction-operation/transaction-operation.module.css index 6f27b9c..d758c88 100644 --- a/components/transaction-operation/transaction-operation.module.css +++ b/components/transaction-operation/transaction-operation.module.css @@ -98,7 +98,7 @@ .modalWrapper { position: fixed; z-index: 100; - background: white; + background: var(--colorBackgroundMedium); border-radius: 10px; padding: 20px 10px; width: 80%; diff --git a/styles/Home.module.css b/styles/Home.module.css index c691749..c5418cc 100644 --- a/styles/Home.module.css +++ b/styles/Home.module.css @@ -80,7 +80,7 @@ margin: 0; padding: 1rem; display: block; - color:#540075; + color: var(--colorStockText); font-weight: bold; font-size: 1.2rem; cursor: pointer; From 9fd500657cfab4f952f9525bcba9dcc15eb854cc Mon Sep 17 00:00:00 2001 From: Shubham Date: Tue, 26 Oct 2021 19:45:53 +0530 Subject: [PATCH 07/16] Add cookie for dark theme --- components/Dark-Theme/useDarkMode.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/components/Dark-Theme/useDarkMode.js b/components/Dark-Theme/useDarkMode.js index 4224640..89dc204 100644 --- a/components/Dark-Theme/useDarkMode.js +++ b/components/Dark-Theme/useDarkMode.js @@ -5,8 +5,24 @@ export const useDarkMode = () => { const [theme, setTheme] = useState('light'); const [themeData, setThemeData] = useState(lightTheme); const [mountedComponent, setMountedComponent] = useState(false); + const setCookie = (name, value, days) => { + const domain = '.realdevsquad.com'; + const expires = new Date(Date.now() + 24 * days * 60 * 60 * 1000); + const cookieStr = `${name}=${value}; expires=${expires}; domain=${domain}; path=/`; + document.cookie = cookieStr; + }; + const accessCookie = (cookieName) => { + const name = `${cookieName}=`; + const allCookieArray = document.cookie.split(';'); + for (let i = 0; i < allCookieArray.length; i += 1) { + const temp = allCookieArray[i].trim(); + if (temp.indexOf(name) === 0) + return temp.substring(name.length, temp.length); + } + return ''; + }; const setMode = (mode) => { - window.localStorage.setItem('theme', mode); + setCookie('theme', mode, 30); setTheme(mode); const themeMode = mode === 'light' ? lightTheme : darkTheme; setThemeData(themeMode); @@ -18,14 +34,13 @@ export const useDarkMode = () => { }; useEffect(() => { - const localTheme = window.localStorage.getItem('theme'); + const localTheme = accessCookie('theme'); const themeMode = localTheme === 'light' ? lightTheme : darkTheme; if (localTheme) { setTheme(localTheme); setThemeData(themeMode); } setMountedComponent(true); - console.log('here'); }, []); return [theme, themeData, themeToggler, mountedComponent]; }; From 85c07f8dc828ea04cf465dd2e409b3058023b52d Mon Sep 17 00:00:00 2001 From: Shubham Date: Fri, 5 Nov 2021 16:24:54 +0530 Subject: [PATCH 08/16] Added cookie functions in utils --- components/Dark-Theme/useDarkMode.js | 19 ++----------------- utils/cookie.js | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 utils/cookie.js diff --git a/components/Dark-Theme/useDarkMode.js b/components/Dark-Theme/useDarkMode.js index 89dc204..b57b5f3 100644 --- a/components/Dark-Theme/useDarkMode.js +++ b/components/Dark-Theme/useDarkMode.js @@ -1,26 +1,11 @@ import { useEffect, useState } from 'react'; +import { setCookie, getCookie } from '../../utils/cookie'; import { lightTheme, darkTheme } from '@components/Dark-Theme/Themes'; export const useDarkMode = () => { const [theme, setTheme] = useState('light'); const [themeData, setThemeData] = useState(lightTheme); const [mountedComponent, setMountedComponent] = useState(false); - const setCookie = (name, value, days) => { - const domain = '.realdevsquad.com'; - const expires = new Date(Date.now() + 24 * days * 60 * 60 * 1000); - const cookieStr = `${name}=${value}; expires=${expires}; domain=${domain}; path=/`; - document.cookie = cookieStr; - }; - const accessCookie = (cookieName) => { - const name = `${cookieName}=`; - const allCookieArray = document.cookie.split(';'); - for (let i = 0; i < allCookieArray.length; i += 1) { - const temp = allCookieArray[i].trim(); - if (temp.indexOf(name) === 0) - return temp.substring(name.length, temp.length); - } - return ''; - }; const setMode = (mode) => { setCookie('theme', mode, 30); setTheme(mode); @@ -34,7 +19,7 @@ export const useDarkMode = () => { }; useEffect(() => { - const localTheme = accessCookie('theme'); + const localTheme = getCookie('theme'); const themeMode = localTheme === 'light' ? lightTheme : darkTheme; if (localTheme) { setTheme(localTheme); diff --git a/utils/cookie.js b/utils/cookie.js new file mode 100644 index 0000000..0aaa3d0 --- /dev/null +++ b/utils/cookie.js @@ -0,0 +1,22 @@ +const setCookie = (name, value, days) => { + const domain = '.realdevsquad.com'; + const expires = new Date( + Date.now() + 24 * days * 60 * 60 * 1000 + ).toUTCString(); + const encodeValue = encodeURIComponent(value); + const cookieStr = `${name}=${encodeValue}; expires=${expires}; domain=${domain}; path=/`; + document.cookie = cookieStr; +}; + +const getCookie = (cookieName) => { + const name = `${cookieName}=`; + const allCookieArray = document.cookie.split(';'); + for (let i = 0; i < allCookieArray.length; i += 1) { + const temp = allCookieArray[i].trim(); + if (temp.indexOf(name) === 0) + return decodeURIComponent(temp.substring(name.length, temp.length)); + } + return ''; +}; + +export { setCookie, getCookie }; From 6224ca07cd3075fe15e19cd6028f160bec228e9b Mon Sep 17 00:00:00 2001 From: Shubham Date: Fri, 5 Nov 2021 16:58:12 +0530 Subject: [PATCH 09/16] Rename css variables --- components/Dark-Theme/Themes.js | 8 ++++---- .../transaction-details/transaction-details.module.css | 4 ++-- styles/Home.module.css | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/Dark-Theme/Themes.js b/components/Dark-Theme/Themes.js index 8b4294e..c593984 100644 --- a/components/Dark-Theme/Themes.js +++ b/components/Dark-Theme/Themes.js @@ -5,8 +5,8 @@ export const lightTheme = { colorExchangeBackground: 'aliceblue', colorBodyBackground: '#e9ebff', colorText: '#363636', - colorBorder: '#f0e2e7', - colorBorder2: '#f4f4f4', + colorTransactionBorder: '#f0e2e7', + colorCardBorder: '#f4f4f4', colorButtonGreen: '#2ecc71', colorButtonRed: '#ff3838', colorButtonPink: '#ee1a75', @@ -27,8 +27,8 @@ export const darkTheme = { colorExchangeBackground: 'var(--colorBackgroundMedium)', colorBodyBackground: 'var(--colorBackgroundLight)', colorText: '#E1E1EC', - colorBorder: 'rgb(76, 39, 52)', - colorBorder2: 'rgb(51, 55, 57)', + colorTransactionBorder: 'rgb(76, 39, 52)', + colorCardBorder: 'rgb(51, 55, 57)', colorButtonGreen: '#1d8147', colorButtonRed: '#9e0000', colorButtonPink: '#c70f5f', diff --git a/components/transaction-details/transaction-details.module.css b/components/transaction-details/transaction-details.module.css index 839f794..6986a16 100644 --- a/components/transaction-details/transaction-details.module.css +++ b/components/transaction-details/transaction-details.module.css @@ -10,8 +10,8 @@ justify-content: flex-start; flex-wrap: wrap; width: 100%; - border-top: 1px solid var(--colorBorder); - border-bottom: 1px solid var(--colorBorder); + border-top: 1px solid var(--colorTransactionBorder); + border-bottom: 1px solid var(--colorTransactionBorder); cursor: pointer; height:6em; font-size: 17px; diff --git a/styles/Home.module.css b/styles/Home.module.css index c5418cc..4016251 100644 --- a/styles/Home.module.css +++ b/styles/Home.module.css @@ -34,7 +34,7 @@ border: none; } .card { - border: 1px solid var(--colorBorder2); + border: 1px solid var(--colorCardBorder); border-radius: 5px; padding: 1px; background: var(--colorBackgroundLight); From 1225995e9f0529771a6596f3263e29e997b375fe Mon Sep 17 00:00:00 2001 From: Shubham Date: Fri, 5 Nov 2021 19:03:36 +0530 Subject: [PATCH 10/16] Changes in transaction chart for dark mode --- components/transaction-chart/index.js | 6 +++++- pages/index.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/components/transaction-chart/index.js b/components/transaction-chart/index.js index 61ca055..59e312d 100644 --- a/components/transaction-chart/index.js +++ b/components/transaction-chart/index.js @@ -38,7 +38,7 @@ function getDataset(transactionData) { }; } -const TransactionChart = ({ transactionChartData }) => { +const TransactionChart = ({ transactionChartData, theme }) => { const [chartData, setChartData] = useState({}); useEffect(() => { const chart = () => { @@ -62,6 +62,7 @@ const TransactionChart = ({ transactionChartData }) => { { ticks: { autoSkip: true, + fontColor: theme === 'light' ? '#666' : '#fff', }, gridLines: { display: true, @@ -70,6 +71,9 @@ const TransactionChart = ({ transactionChartData }) => { ], xAxes: [ { + ticks: { + fontColor: theme === 'light' ? '#666' : '#fff', + }, gridLines: { display: true, }, diff --git a/pages/index.js b/pages/index.js index b930a93..5acaba2 100644 --- a/pages/index.js +++ b/pages/index.js @@ -53,6 +53,7 @@ export default function Home() {
From 99a20eacfac256e4a1780fdbba57bb0d6de4477c Mon Sep 17 00:00:00 2001 From: Shubham Date: Sat, 26 Feb 2022 02:10:26 +0530 Subject: [PATCH 11/16] Changes in navbar link for dark mode --- components/Dark-Theme/Themes.js | 4 ++++ components/NavBar/navbar.module.css | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/components/Dark-Theme/Themes.js b/components/Dark-Theme/Themes.js index c593984..d510f6a 100644 --- a/components/Dark-Theme/Themes.js +++ b/components/Dark-Theme/Themes.js @@ -19,6 +19,8 @@ export const lightTheme = { colorChartBackground: 'white', colorChartBorder: 'white', colorStockText: '#540075', + colorNavbarLink: '#041484', + colorActiveLink: '#e30464', }; export const darkTheme = { colorBackgroundLight: '#27262D', @@ -41,4 +43,6 @@ export const darkTheme = { colorChartBackground: '#241212', colorChartBorder: '#34383a', colorStockText: '#cf56ff', + colorNavbarLink: '#7eb2fb', + colorActiveLink: '#fb2e86', }; diff --git a/components/NavBar/navbar.module.css b/components/NavBar/navbar.module.css index 04b5b05..78543ce 100644 --- a/components/NavBar/navbar.module.css +++ b/components/NavBar/navbar.module.css @@ -29,8 +29,9 @@ background-color: #1d1283; } .darkTheme { + padding: 19px 16px; + margin: 10px; display: none; - padding: 14px 16px; } .navBarLogoLi { @@ -125,14 +126,14 @@ margin-top: 2px; text-decoration: none; font-weight: bold; - color: #041484; + color: var(--colorNavbarLink); cursor: pointer; background: none; border: none; } .active { - color: #e30464; + color: var(--colorActiveLink); } @media screen and (max-width: 970px) { From b16b137838ff1c9e5ab11dcf362651ac7a32d9dc Mon Sep 17 00:00:00 2001 From: Shubham Date: Sat, 26 Feb 2022 02:11:11 +0530 Subject: [PATCH 12/16] Add default theme for dark mode --- components/Dark-Theme/useDarkMode.js | 3 +++ components/NavBar/index.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/Dark-Theme/useDarkMode.js b/components/Dark-Theme/useDarkMode.js index b57b5f3..e42b2bc 100644 --- a/components/Dark-Theme/useDarkMode.js +++ b/components/Dark-Theme/useDarkMode.js @@ -24,6 +24,9 @@ export const useDarkMode = () => { if (localTheme) { setTheme(localTheme); setThemeData(themeMode); + } else { + //default + setMode('light'); } setMountedComponent(true); }, []); diff --git a/components/NavBar/index.js b/components/NavBar/index.js index e063da7..4e4c1bb 100644 --- a/components/NavBar/index.js +++ b/components/NavBar/index.js @@ -135,9 +135,9 @@ const NavBar = () => { ); })} -
+
  • -
  • +
  • Date: Sat, 16 Apr 2022 13:09:52 +0530 Subject: [PATCH 13/16] Fix toggle icon for mobile view --- components/NavBar/navbar.module.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/NavBar/navbar.module.css b/components/NavBar/navbar.module.css index 78543ce..f41c9e5 100644 --- a/components/NavBar/navbar.module.css +++ b/components/NavBar/navbar.module.css @@ -187,6 +187,10 @@ float: none; } + .darkTheme { + padding: 10px 40px; + } + .mainBanner, .logoImg { margin-top: 40px; From daf5b904bb59059097afce8e4a02dd5638dc3f21 Mon Sep 17 00:00:00 2001 From: Shubham Date: Mon, 18 Apr 2022 00:59:19 +0530 Subject: [PATCH 14/16] Remove unwanted code --- components/custom-button/custom-button.style.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/custom-button/custom-button.style.js b/components/custom-button/custom-button.style.js index 96024cf..f7aa954 100644 --- a/components/custom-button/custom-button.style.js +++ b/components/custom-button/custom-button.style.js @@ -47,7 +47,7 @@ const selectButton = (props) => { return props.inverted ? InvertedButtonStles : BaseButtonStyles; }; -// console.log(selectButton(props)); + export const CustomButtonContainer = styled.button` border-radius: 6px; cursor: pointer; From 142500f2a2bcae53209858ea02aff4006d785272 Mon Sep 17 00:00:00 2001 From: Shubham Date: Thu, 23 Jun 2022 23:21:08 +0530 Subject: [PATCH 15/16] Refactor globalStyle file --- components/Dark-Theme/globalStyles.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/Dark-Theme/globalStyles.js b/components/Dark-Theme/globalStyles.js index 5020e4e..f6e7c20 100644 --- a/components/Dark-Theme/globalStyles.js +++ b/components/Dark-Theme/globalStyles.js @@ -3,13 +3,13 @@ import { createGlobalStyle } from 'styled-components'; const GlobalStyles = createGlobalStyle` :root{ ${({ theme }) => { - let s = ``; - for (var prop in theme) { - if (prop in theme) { - s += `--${prop}: ${theme[prop]};`; + let style = ``; + for (const variableName in theme) { + if (variableName in theme) { + style += `--${variableName}: ${theme[variableName]};`; } } - return s; + return style; }} } body{ From fbb6599a0afb71dc5d5dfd99506a04d3cbf2004f Mon Sep 17 00:00:00 2001 From: Shubham Date: Thu, 23 Jun 2022 23:22:28 +0530 Subject: [PATCH 16/16] Fix variable name --- components/Dark-Theme/Themes.js | 4 ++-- components/stock-operation-modal/stock-operation.module.css | 2 +- .../transaction-operation/transaction-operation.module.css | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/Dark-Theme/Themes.js b/components/Dark-Theme/Themes.js index d510f6a..735bffe 100644 --- a/components/Dark-Theme/Themes.js +++ b/components/Dark-Theme/Themes.js @@ -15,7 +15,7 @@ export const lightTheme = { colorAuctionBackground: 'rgb(245, 235, 235)', colorWhite: 'black', colorAuctionInput: '#ccc', - colorStockLablel: '#464646', + colorStockLabel: '#464646', colorChartBackground: 'white', colorChartBorder: 'white', colorStockText: '#540075', @@ -39,7 +39,7 @@ export const darkTheme = { colorAuctionBackground: '#2e1717', colorWhite: '#fff', colorAuctionInput: 'white', - colorStockLablel: 'var(--colorWhite)', + colorStockLabel: 'var(--colorWhite)', colorChartBackground: '#241212', colorChartBorder: '#34383a', colorStockText: '#cf56ff', diff --git a/components/stock-operation-modal/stock-operation.module.css b/components/stock-operation-modal/stock-operation.module.css index 6dd3346..3375463 100644 --- a/components/stock-operation-modal/stock-operation.module.css +++ b/components/stock-operation-modal/stock-operation.module.css @@ -50,7 +50,7 @@ .label { font-weight: bold; margin: 0.5rem 0; - color: var(--colorStockLablel); + color: var(--colorStockLabel); } .select { diff --git a/components/transaction-operation/transaction-operation.module.css b/components/transaction-operation/transaction-operation.module.css index d758c88..2a56b46 100644 --- a/components/transaction-operation/transaction-operation.module.css +++ b/components/transaction-operation/transaction-operation.module.css @@ -50,7 +50,7 @@ .label { font-weight: bold; margin: 0.5rem 0; - color: var(--colorStockLablel); + color: var(--colorStockLabel); } .select {