123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /* eslint-disable consistent-return */
- import { createGlobalStyle, css } from 'styled-components';
- export const mediaRule = {
- mobileS: '320px',
- mobileM: '375px',
- mobileL: '425px',
- tablet: '768px',
- laptop: '1024px',
- desktop: '1440px',
- };
- export const theme = {
- primary: '#00bfa5',
- secondary: '#2d3e4e',
- success: '#b8e986',
- error: '#ff3b30',
- warning: '#ffc107',
- sicklyGreen: '#8ec31f',
- normal: '#828282',
- progress: '#acda33',
- };
- export const GlobalStyle = createGlobalStyle`
- html, body {
- margin: 0;
- background-color: #f8f8f8;
- height: 100%;
- font-size: 14px;
- & > div {
- height: 100%;
- }
- }
- ${({ lang }) => {
- if (lang === 'zh-tw') return css`@import url('https://fonts.googleapis.com/css?family=Noto+Sans+TC:300,400,700&display=swap');`;
- if (lang === 'zh-cn') return css`@import url('https://fonts.googleapis.com/css?family=Noto+Sans+SC:300,400,700&display=swap');`;
- if (lang === 'ja') return css`@import url('https://fonts.googleapis.com/css?family=Noto+Sans+JP:300,400,700&display=swap');`;
- if (lang === 'en') return css`@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&display=swap');`;
- }}
-
- &:lang(en) {
- font-family: 'Open Sans', sans-serif;
- }
- &:lang(zh-tw) {
- font-family: 'Noto Sans TC', sans-serif;
- }
- &:lang(zh-cn) {
- font-family: 'Noto Sans SC', sans-serif;
- }
- &:lang(ja) {
- font-family: 'Noto Sans JP', sans-serif;
- }
- `;
- export default GlobalStyle;
|