UNPKG

dm-web-react

Version:

The DM web client with React.

132 lines (124 loc) 2.87 kB
import { Children } from "react"; import { injectGlobal, withTheme } from "./styled"; export interface GlobalProps { theme: any; children: any; } const GlobalStyled = ({ theme, children }: GlobalProps) => { injectGlobal` /* scrollbar start */ ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-thumb { min-height: 50px; border-radius: 3px; } ::-webkit-scrollbar-track, ::-webkit-scrollbar-track-piece, ::-webkit-scrollbar-button, ::-webkit-scrollbar-corner, ::-webkit-resizer { display: none; } ::-webkit-scrollbar-thumb { background-color: #666; } ::-webkit-scrollbar-thumb:hover { background-color: #999; } /* scrollbar end */ /* app start */ * { font-family: 'Microsoft Yahei'; } html,body,#root,.app { height: 100%; } body { margin: 0; padding: 0; background: #f5f5f5; } a { color: #5050e8; text-decoration: none; } /* app end */ /* react-datepicker start */ .react-datepicker { .react-datepicker__input-container { input { height: 24px; padding: 0 6px; line-height: 24px; font-size: 12px; border: 1px solid ${theme.input.default_borderColor}; background: ${theme.input.default_background}; border-radius: 4px; outline: none; } } .react-datepicker__current-month{ display: none; } .react-datepicker__year-read-view--down-arrow, .react-datepicker__month-read-view--down-arrow, .react-datepicker__month-year-read-view--down-arrow { top: 4px; } .react-datepicker__year-read-view, .react-datepicker__month-read-view, .react-datepicker__month-year-read-view { visibility: visible !important; } } /* react-datepicker end */ /* react-toastify start */ .Toastify { .Toastify__toast-container { width: 440px; } .Toastify__toast-container--top-center, .Toastify__toast-container--bottom-center { margin-left: -220px; } .Toastify__toast { min-height: 46px; border-radius: 4px; } .Toastify__toast--success { background: #00CC1B; } .Toastify__toast-body { font-size: 14px; text-align: center; } .Toastify__progress-bar { height: 2px; } /* custom start */ .Toastify__custom--close-btn-container { display: flex; justify-content: center; align-items: center; } .Toastify__custom--close-btn { width: 12px; height: 12px; color: #009914; } .Toastify__toast--error .Toastify__custom--close-btn { color: #fff; } .Toastify__custom--close-btn > svg { vertical-align: top } /* custom end */ } /* react-toastify end */ `; return Children.only(children); }; export default withTheme(GlobalStyled);