joyent-portal/packages/ui-toolkit/src/styleguide/wrapper.js

34 lines
789 B
JavaScript
Raw Normal View History

import React from 'react';
import styled, { ThemeProvider, injectGlobal } from 'styled-components';
2017-10-19 16:36:18 +03:00
import theme from '../theme';
import Base from '../base';
2017-10-19 16:36:18 +03:00
import { RootContainer } from '../layout';
import 'codemirror/mode/jsx/jsx';
2017-12-18 13:25:50 +02:00
injectGlobal`
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono:700,400');
@import url('https://fonts.googleapis.com/css?family=Libre+Franklin:400,500,600,700');
2017-12-18 13:25:50 +02:00
button {
cursor: pointer;
}
code, .CodeMirror-line * {
font-family: 'Roboto Mono';
2017-12-18 13:25:50 +02:00
}
`;
const StyledBase = styled(Base)`
2017-09-27 17:44:57 +03:00
/* trick prettier */
background-color: transparent;
`;
2017-10-19 16:36:18 +03:00
export default ({ children }) => (
<ThemeProvider theme={theme}>
<StyledBase>
2017-12-15 16:53:59 +02:00
<RootContainer>{children}</RootContainer>
2017-10-19 16:36:18 +03:00
</StyledBase>
</ThemeProvider>
);