TheSinding / dark-mode-challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help SPACEMAN join the dark side (theme switcher)

Coding Challenge for Morningscore

  • Help our mascot, SPACEMAN, join the dark side by completing this challenge! This is part of our job screening process, but anyone willing to take on the challenge is very welcome to send the results our way (send to job@morningscore.io). See instructions below.

Difficulty: Medium | Time required: ~ 30 minutes

spaceman

Requirements

  • Add dark-mode switching functionality to the existing dark-mode button found in the ThemeSwitcher component
    • Utilise the existing dark-mode scss file by adding a dark-mode class to a parent html element of the App component
  • When in Dark mode:
    • The button icon should be faSun
    • The button icon colour should be (#FFA500). You can use the color prop on the Icon component.

Think about

  • How to prevent unnecessary re-renders.
  • How to implement dark mode in a bigger application. Would your solution work for this?
  • How to make the theme selection persistent for the user.
  • How to showcase your React skills and knowledge with this relatively simple challenge.

screenshot-light screenshot-dark

Getting started

npm i
npm start

This package includes scripts and configuration used by Create React App. Please refer to its documentation:

About


Languages

Language:JavaScript 49.3%Language:CSS 32.7%Language:HTML 18.0%