0xProject / 0x-launch-kit-frontend

Apache License 2.0
114 stars 208 forks source link

(Feature) Dark theme #329

Closed Agupane closed 5 years ago

Agupane commented 5 years ago

Related to #327

Adds support for multiples themes, this should be also styled in order to add the "Dark Theme"

If a user wants to add a new theme, he should only need to:

  1. extend the /src/themes/DefaultTheme.ts object and modify current properties (or add new ones),
  2. add a name on the map.
  3. set the .env variable REACT_APP_THEME_NAME with the name of the added theme.

The core mechanism relays on /src/util/template_meta_data.ts It maps an array of KNOW_THEMES_META_DATA / KNOW_THEMES_MODAL_META_DATA to a Theme object

The file/src/themes/theme_meta_data.ts contains a map of themeName: Theme.