Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Latest commit

 

History

History
54 lines (42 loc) · 1.38 KB

theming.md

File metadata and controls

54 lines (42 loc) · 1.38 KB

Styled-component has an elegant theme implementation that can contain our custom theme information in props. After a simple function wrapped, we can easily introduce the theme in each styles file. like:

Export const RespectText = styled.div`
  Color: ${theme('editor.placeholder')};
  Display: block;
`

The key value of the theme can refer to utils/theme/skils/cyan.js

Const cyan = {
  Name: 'cyan',
  logoText: descText,
  Cover: primaryColor,
  coverIndex: '#F9FCFC',
  contrastFg: '#eca014',
  htmlBg: bannerBg,
  Loading: {
    Basic: bannerBg,
    Animate: lighten(0.03, bannerBg),
  },
  Error: {
    Title: primaryColor,
    Desc: darken(0.1, primaryColor),
    Bg: lighten(0.02, contentBoxBg),
  },

....

All the topics currently supported are under utils/theme/skins and will continue to expand in the future.

Skins/
├── cyan.js
├── github.js
├── green.js
├── index.js
├── iron_green.js
├── monokai.js
├── purple.js
├── solarized_dark.js
└── yellow.js

image

image