UNPKG

2.05 kBJavaScriptView Raw
1function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
3import React from 'react';
4import { styled } from '@storybook/theming';
5import { transparentize } from 'polished';
6import { withReset } from '../typography/shared';
7var breakpoint = 600;
8export var Title = styled.h1(withReset, function (_ref) {
9 var theme = _ref.theme;
10 return _defineProperty({
11 color: theme.color.defaultText,
12 fontSize: theme.typography.size.m3,
13 fontWeight: theme.typography.weight.black,
14 lineHeight: '32px'
15 }, "@media (min-width: ".concat(breakpoint, "px)"), {
16 fontSize: theme.typography.size.l1,
17 lineHeight: '36px',
18 marginBottom: '.5rem' // 8px
19
20 });
21});
22export var Subtitle = styled.h2(withReset, function (_ref3) {
23 var _ref4;
24
25 var theme = _ref3.theme;
26 return _ref4 = {
27 fontWeight: theme.typography.weight.regular,
28 fontSize: theme.typography.size.s3,
29 lineHeight: '20px',
30 borderBottom: 'none',
31 marginBottom: 15
32 }, _defineProperty(_ref4, "@media (min-width: ".concat(breakpoint, "px)"), {
33 fontSize: theme.typography.size.m1,
34 lineHeight: '28px',
35 marginBottom: 24
36 }), _defineProperty(_ref4, "color", transparentize(0.25, theme.color.defaultText)), _ref4;
37});
38export var DocsContent = styled.div({
39 maxWidth: 1000,
40 width: '100%'
41});
42export var DocsWrapper = styled.div(function (_ref5) {
43 var theme = _ref5.theme;
44 return _defineProperty({
45 background: theme.background.content,
46 display: 'flex',
47 justifyContent: 'center',
48 padding: '4rem 20px',
49 minHeight: '100vh',
50 boxSizing: 'border-box'
51 }, "@media (min-width: ".concat(breakpoint, "px)"), {});
52});
53export var DocsPageWrapper = function DocsPageWrapper(_ref7) {
54 var children = _ref7.children;
55 return /*#__PURE__*/React.createElement(DocsWrapper, null, /*#__PURE__*/React.createElement(DocsContent, null, children));
56};
57DocsPageWrapper.displayName = "DocsPageWrapper";
\No newline at end of file