@comicrelief/component-library 7.40.0 → 7.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ exports.TextItalic = exports.DropdownList = exports.DropdownItemSelectable = exp
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
  var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
10
10
  var _zIndex = _interopRequireDefault(require("../../../theme/shared/zIndex"));
11
- var _size = require("../../../theme/shared/size");
11
+ var _allBreakpoints = require("../../../theme/shared/allBreakpoints");
12
12
  var _Text = _interopRequireDefault(require("../Text/Text"));
13
13
  const Container = exports.Container = _styledComponents.default.div.withConfig({
14
14
  displayName: "TextInputWithDropdownstyle__Container",
@@ -17,7 +17,7 @@ const Container = exports.Container = _styledComponents.default.div.withConfig({
17
17
  const Dropdown = exports.Dropdown = _styledComponents.default.div.withConfig({
18
18
  displayName: "TextInputWithDropdownstyle__Dropdown",
19
19
  componentId: "sc-1s4bv7m-1"
20
- })(["", " font-family:", ";position:absolute;left:0;max-height:300px;overflow:auto;background-color:", ";border:1px solid;margin-top:-1px;width:100%;@media (min-width:", "){max-width:500px;}"], (0, _zIndex.default)('high'), _ref => {
20
+ })(["", " font-family:", ";position:absolute;left:0;max-height:300px;overflow:auto;background-color:", ";border:1px solid;margin-top:-1px;width:100%;@media (min-width:", "px){max-width:500px;}"], (0, _zIndex.default)('high'), _ref => {
21
21
  let {
22
22
  theme
23
23
  } = _ref;
@@ -27,7 +27,7 @@ const Dropdown = exports.Dropdown = _styledComponents.default.div.withConfig({
27
27
  theme
28
28
  } = _ref2;
29
29
  return theme.color('white');
30
- }, _size.screen.small);
30
+ }, _allBreakpoints.sizes.M);
31
31
  const DropdownList = exports.DropdownList = _styledComponents.default.ul.withConfig({
32
32
  displayName: "TextInputWithDropdownstyle__DropdownList",
33
33
  componentId: "sc-1s4bv7m-2"
@@ -8,7 +8,7 @@ exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _styledComponents = _interopRequireDefault(require("styled-components"));
10
10
  var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
11
- var _size = require("../../../theme/shared/size");
11
+ var _allBreakpoints = require("../../../theme/shared/allBreakpoints");
12
12
  const Wrapper = _styledComponents.default.div.withConfig({
13
13
  displayName: "Banner__Wrapper",
14
14
  componentId: "sc-14ows70-0"
@@ -22,7 +22,7 @@ const Wrapper = _styledComponents.default.div.withConfig({
22
22
  const Container = _styledComponents.default.div.withConfig({
23
23
  displayName: "Banner__Container",
24
24
  componentId: "sc-14ows70-1"
25
- })(["text-align:center;padding:calc(", " * 2) ", ";margin:0 auto;max-width:", ";@media ", "{padding:", " ", ";}@media ", "{padding:", " ", ";}"], (0, _spacing.default)('m'), (0, _spacing.default)('m'), _size.screen.large, _ref2 => {
25
+ })(["text-align:center;padding:calc(", " * 2) ", ";margin:0 auto;max-width:", "px;@media ", "{padding:", " ", ";}@media ", "{padding:", " ", ";}"], (0, _spacing.default)('m'), (0, _spacing.default)('m'), _allBreakpoints.sizes.XL, _ref2 => {
26
26
  let {
27
27
  theme
28
28
  } = _ref2;
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _reactResponsive = require("react-responsive");
11
- var _size = require("../../../theme/shared/size");
11
+ var _allBreakpoints = require("../../../theme/shared/allBreakpoints");
12
12
  var _Text = _interopRequireDefault(require("../../Atoms/Text/Text"));
13
13
  var _Picture = _interopRequireDefault(require("../../Atoms/Picture/Picture"));
14
14
  var _Form = _interopRequireDefault(require("./Form/Form"));
@@ -53,7 +53,7 @@ const Donate = _ref => {
53
53
  monthlyOtherAmountText: monthlyOther
54
54
  } = _ref;
55
55
  let isDesktop = (0, _reactResponsive.useMediaQuery)({
56
- query: "(min-width: ".concat(_size.screen.medium, ")")
56
+ query: "(min-width: ".concat(_allBreakpoints.sizes.L, "px)")
57
57
  });
58
58
 
59
59
  // To let us store any updated override, and force a re-render
@@ -9,7 +9,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
  var _Link = _interopRequireDefault(require("../../../Atoms/Link/Link"));
10
10
  var _hideVisually = _interopRequireDefault(require("../../../../theme/shared/hideVisually"));
11
11
  var _zIndex = _interopRequireDefault(require("../../../../theme/shared/zIndex"));
12
- var _size = require("../../../../theme/shared/size");
13
12
  const NavLinkClass = (0, _styledComponents.default)(_Link.default).withConfig({
14
13
  displayName: "Navstyle__NavLinkClass",
15
14
  componentId: "sc-1ss3uk2-0"
@@ -31,15 +30,20 @@ const NavLinkClass = (0, _styledComponents.default)(_Link.default).withConfig({
31
30
  const Nav = exports.Nav = _styledComponents.default.nav.withConfig({
32
31
  displayName: "Navstyle__Nav",
33
32
  componentId: "sc-1ss3uk2-1"
34
- })(["display:", ";width:100%;position:absolute;top:75px;left:0;", ";@media (min-width:", "){width:50%;right:0;left:inherit;}@media ", "{", ";position:relative;top:0;display:block;margin:0 10px;width:auto;height:100%;}> h2{", ";}"], _ref3 => {
33
+ })(["display:", ";width:100%;position:absolute;top:75px;left:0;", ";@media ", "{width:50%;right:0;left:inherit;}@media ", "{", ";position:relative;top:0;display:block;margin:0 10px;width:auto;height:100%;}> h2{", ";}"], _ref3 => {
35
34
  let {
36
35
  isExpandable
37
36
  } = _ref3;
38
37
  return isExpandable ? 'block' : 'none';
39
- }, (0, _zIndex.default)('higher'), _size.screen.small, _ref4 => {
38
+ }, (0, _zIndex.default)('higher'), _ref4 => {
40
39
  let {
41
40
  theme
42
41
  } = _ref4;
42
+ return theme.allBreakpoints('M');
43
+ }, _ref5 => {
44
+ let {
45
+ theme
46
+ } = _ref5;
43
47
  return theme.allBreakpoints('Nav');
44
48
  }, (0, _zIndex.default)('medium'), _hideVisually.default);
45
49
 
@@ -49,25 +53,25 @@ const Nav = exports.Nav = _styledComponents.default.nav.withConfig({
49
53
  const SubNavMenu = exports.SubNavMenu = _styledComponents.default.ul.withConfig({
50
54
  displayName: "Navstyle__SubNavMenu",
51
55
  componentId: "sc-1ss3uk2-2"
52
- })(["display:", ";padding:0;position:relative;list-style:none outside;left:0;top:0;flex-direction:column;justify-content:center;align-items:center;background-color:", ";@media ", "{display:none;display:", ";top:90px;position:absolute;padding:0 0 20px;width:250px;height:auto;}"], _ref5 => {
56
+ })(["display:", ";padding:0;position:relative;list-style:none outside;left:0;top:0;flex-direction:column;justify-content:center;align-items:center;background-color:", ";@media ", "{display:none;display:", ";top:90px;position:absolute;padding:0 0 20px;width:250px;height:auto;}"], _ref6 => {
53
57
  let {
54
58
  isSubMenuOpen
55
- } = _ref5;
59
+ } = _ref6;
56
60
  return isSubMenuOpen ? 'flex' : 'none';
57
- }, _ref6 => {
61
+ }, _ref7 => {
58
62
  let {
59
63
  theme
60
- } = _ref6;
64
+ } = _ref7;
61
65
  return theme.color('deep_violet_dark');
62
- }, _ref7 => {
66
+ }, _ref8 => {
63
67
  let {
64
68
  theme
65
- } = _ref7;
69
+ } = _ref8;
66
70
  return theme.allBreakpoints('Nav');
67
- }, _ref8 => {
71
+ }, _ref9 => {
68
72
  let {
69
73
  isKeyPressed
70
- } = _ref8;
74
+ } = _ref9;
71
75
  return isKeyPressed ? 'flex' : 'none';
72
76
  });
73
77
 
@@ -77,15 +81,15 @@ const SubNavMenu = exports.SubNavMenu = _styledComponents.default.ul.withConfig(
77
81
  const SubNavItem = exports.SubNavItem = _styledComponents.default.li.withConfig({
78
82
  displayName: "Navstyle__SubNavItem",
79
83
  componentId: "sc-1ss3uk2-3"
80
- })(["padding:0;height:100%;width:100%;:hover{background-color:", ";span{border-bottom:0;padding-bottom:2px;color:", ";}}"], _ref9 => {
84
+ })(["padding:0;height:100%;width:100%;:hover{background-color:", ";span{border-bottom:0;padding-bottom:2px;color:", ";}}"], _ref10 => {
81
85
  let {
82
86
  theme
83
- } = _ref9;
87
+ } = _ref10;
84
88
  return theme.color('deep_violet_light');
85
- }, _ref10 => {
89
+ }, _ref11 => {
86
90
  let {
87
91
  theme
88
- } = _ref10;
92
+ } = _ref11;
89
93
  return theme.color('white');
90
94
  });
91
95
 
@@ -95,10 +99,10 @@ const SubNavItem = exports.SubNavItem = _styledComponents.default.li.withConfig(
95
99
  const SubNavLink = exports.SubNavLink = (0, _styledComponents.default)(NavLinkClass).withConfig({
96
100
  displayName: "Navstyle__SubNavLink",
97
101
  componentId: "sc-1ss3uk2-4"
98
- })(["padding:14px 14px 7px 21px;color:", ";height:auto;position:relative;"], _ref11 => {
102
+ })(["padding:14px 14px 7px 21px;color:", ";height:auto;position:relative;"], _ref12 => {
99
103
  let {
100
104
  theme
101
- } = _ref11;
105
+ } = _ref12;
102
106
  return theme.color('white');
103
107
  });
104
108
 
@@ -108,25 +112,25 @@ const SubNavLink = exports.SubNavLink = (0, _styledComponents.default)(NavLinkCl
108
112
  const SubNavLinkUnderline = exports.SubNavLinkUnderline = (0, _styledComponents.default)(SubNavLink).withConfig({
109
113
  displayName: "Navstyle__SubNavLinkUnderline",
110
114
  componentId: "sc-1ss3uk2-5"
111
- })(["padding:26px 21px;::after{content:'';position:absolute;width:14px;border-bottom:2px solid ", ";left:12px;top:auto;bottom:10px;margin:0 10px;}@media ", "{::before{display:block;position:absolute;content:'';left:34px;width:10px;height:10px;border:11px solid transparent;border-bottom-color:", ";top:-22px;}:hover::before{border-bottom-color:", ";}}"], _ref12 => {
112
- let {
113
- theme
114
- } = _ref12;
115
- return theme.color('white');
116
- }, _ref13 => {
115
+ })(["padding:26px 21px;::after{content:'';position:absolute;width:14px;border-bottom:2px solid ", ";left:12px;top:auto;bottom:10px;margin:0 10px;}@media ", "{::before{display:block;position:absolute;content:'';left:34px;width:10px;height:10px;border:11px solid transparent;border-bottom-color:", ";top:-22px;}:hover::before{border-bottom-color:", ";}}"], _ref13 => {
117
116
  let {
118
117
  theme
119
118
  } = _ref13;
120
- return theme.allBreakpoints('Nav');
119
+ return theme.color('white');
121
120
  }, _ref14 => {
122
121
  let {
123
122
  theme
124
123
  } = _ref14;
125
- return theme.color('deep_violet_dark');
124
+ return theme.allBreakpoints('Nav');
126
125
  }, _ref15 => {
127
126
  let {
128
127
  theme
129
128
  } = _ref15;
129
+ return theme.color('deep_violet_dark');
130
+ }, _ref16 => {
131
+ let {
132
+ theme
133
+ } = _ref16;
130
134
  return theme.color('deep_violet_light');
131
135
  });
132
136
 
@@ -136,20 +140,20 @@ const SubNavLinkUnderline = exports.SubNavLinkUnderline = (0, _styledComponents.
136
140
  const NavMenu = exports.NavMenu = _styledComponents.default.ul.withConfig({
137
141
  displayName: "Navstyle__NavMenu",
138
142
  componentId: "sc-1ss3uk2-6"
139
- })(["background-color:", ";list-style:none outside;padding:0;margin:0;@media ", "{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;background-color:", ";}"], _ref16 => {
143
+ })(["background-color:", ";list-style:none outside;padding:0;margin:0;@media ", "{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;background-color:", ";}"], _ref17 => {
140
144
  let {
141
145
  theme
142
- } = _ref16;
146
+ } = _ref17;
143
147
  return theme.color('grey_extra_light');
144
- }, _ref17 => {
148
+ }, _ref18 => {
145
149
  let {
146
150
  theme
147
- } = _ref17;
151
+ } = _ref18;
148
152
  return theme.allBreakpoints('Nav');
149
- }, _ref18 => {
153
+ }, _ref19 => {
150
154
  let {
151
155
  theme
152
- } = _ref18;
156
+ } = _ref19;
153
157
  return theme.color('white');
154
158
  });
155
159
 
@@ -159,15 +163,15 @@ const NavMenu = exports.NavMenu = _styledComponents.default.ul.withConfig({
159
163
  const NavLink = exports.NavLink = (0, _styledComponents.default)(NavLinkClass).withConfig({
160
164
  displayName: "Navstyle__NavLink",
161
165
  componentId: "sc-1ss3uk2-7"
162
- })(["display:flex;gap:4px;font-family:", ";@media ", "{padding:10px 0;height:auto;:focus + ", "{display:flex;}}"], _ref19 => {
166
+ })(["display:flex;gap:4px;font-family:", ";@media ", "{padding:10px 0;height:auto;:focus + ", "{display:flex;}}"], _ref20 => {
163
167
  let {
164
168
  theme
165
- } = _ref19;
169
+ } = _ref20;
166
170
  return theme.fontFamilies(theme.font.regular);
167
- }, _ref20 => {
171
+ }, _ref21 => {
168
172
  let {
169
173
  theme
170
- } = _ref20;
174
+ } = _ref21;
171
175
  return theme.allBreakpoints('Nav');
172
176
  }, SubNavMenu);
173
177
 
@@ -177,20 +181,20 @@ const NavLink = exports.NavLink = (0, _styledComponents.default)(NavLinkClass).w
177
181
  const NavItem = exports.NavItem = _styledComponents.default.li.withConfig({
178
182
  displayName: "Navstyle__NavItem",
179
183
  componentId: "sc-1ss3uk2-8"
180
- })(["", ";position:relative;font-weight:700;:hover{li{span{border-bottom:none;padding-bottom:0;}}}li{span{border-bottom:none;padding-bottom:0;}:hover{span{border-bottom:none;padding-bottom:0;}}}:hover{background-color:", ";}@media ", "{margin:0 4px;padding:25px 5px;:hover > ", ",:focus-within > ", "{visibility:visible;opacity:1;display:flex;}:hover{background-color:transparent;", ";span{border-bottom:2px solid ", ";padding-bottom:2px;}", "{display:flex;flex-direction:column;}}}"], (0, _zIndex.default)('medium'), _ref21 => {
184
+ })(["", ";position:relative;font-weight:700;:hover{li{span{border-bottom:none;padding-bottom:0;}}}li{span{border-bottom:none;padding-bottom:0;}:hover{span{border-bottom:none;padding-bottom:0;}}}:hover{background-color:", ";}@media ", "{margin:0 4px;padding:25px 5px;:hover > ", ",:focus-within > ", "{visibility:visible;opacity:1;display:flex;}:hover{background-color:transparent;", ";span{border-bottom:2px solid ", ";padding-bottom:2px;}", "{display:flex;flex-direction:column;}}}"], (0, _zIndex.default)('medium'), _ref22 => {
181
185
  let {
182
186
  theme
183
- } = _ref21;
187
+ } = _ref22;
184
188
  return theme.color('teal_light');
185
- }, _ref22 => {
189
+ }, _ref23 => {
186
190
  let {
187
191
  theme
188
- } = _ref22;
192
+ } = _ref23;
189
193
  return theme.allBreakpoints('Nav');
190
- }, SubNavMenu, SubNavMenu, (0, _zIndex.default)('high'), _ref23 => {
194
+ }, SubNavMenu, SubNavMenu, (0, _zIndex.default)('high'), _ref24 => {
191
195
  let {
192
196
  theme
193
- } = _ref23;
197
+ } = _ref24;
194
198
  return theme.color('black');
195
199
  }, SubNavMenu);
196
200
  const ChevronWrapper = exports.ChevronWrapper = _styledComponents.default.div.withConfig({
package/dist/index.js CHANGED
@@ -334,6 +334,12 @@ Object.defineProperty(exports, "allBreakpoints", {
334
334
  return _allBreakpoints.default;
335
335
  }
336
336
  });
337
+ Object.defineProperty(exports, "allContainers", {
338
+ enumerable: true,
339
+ get: function () {
340
+ return _allContainers.default;
341
+ }
342
+ });
337
343
  Object.defineProperty(exports, "allowListed", {
338
344
  enumerable: true,
339
345
  get: function () {
@@ -422,6 +428,7 @@ var _spacing = _interopRequireDefault(require("./theme/shared/spacing"));
422
428
  var _breakpoint = _interopRequireDefault(require("./theme/shared/breakpoint"));
423
429
  var _allBreakpoints = _interopRequireDefault(require("./theme/shared/allBreakpoints"));
424
430
  var _size = require("./theme/shared/size");
431
+ var _allContainers = _interopRequireDefault(require("./theme/shared/allContainers"));
425
432
  var _Text = _interopRequireDefault(require("./components/Atoms/Text/Text"));
426
433
  var _Logo = _interopRequireDefault(require("./components/Atoms/Logo/Logo"));
427
434
  var _Picture = _interopRequireDefault(require("./components/Atoms/Picture/Picture"));
@@ -4,6 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.sizes = exports.default = void 0;
7
+ /**
8
+ * For usage and examples see utils.md
9
+ */
10
+
7
11
  const sizes = exports.sizes = {
8
12
  S: 0,
9
13
  M: 740,
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- const container = {
7
+ const allContainers = {
8
8
  small: '880px',
9
9
  medium: '1200px',
10
10
  large: '1440px'
11
11
  };
12
- var _default = exports.default = container;
12
+ var _default = exports.default = allContainers;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comicrelief/component-library",
3
3
  "author": "Comic Relief Engineering Team",
4
- "version": "7.40.0",
4
+ "version": "7.42.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -2,7 +2,7 @@ import styled from 'styled-components';
2
2
 
3
3
  import spacing from '../../../theme/shared/spacing';
4
4
  import zIndex from '../../../theme/shared/zIndex';
5
- import { screen } from '../../../theme/shared/size';
5
+ import { sizes } from '../../../theme/shared/allBreakpoints';
6
6
  import Text from '../Text/Text';
7
7
 
8
8
  const Container = styled.div`
@@ -21,7 +21,7 @@ const Dropdown = styled.div`
21
21
  margin-top: -1px;
22
22
  width: 100%;
23
23
 
24
- @media (min-width: ${screen.small}) {
24
+ @media (min-width: ${sizes.M}px) {
25
25
  max-width: 500px;
26
26
  }
27
27
  `;
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
 
5
5
  import spacing from '../../../theme/shared/spacing';
6
- import { screen } from '../../../theme/shared/size';
6
+ import { sizes } from '../../../theme/shared/allBreakpoints';
7
7
 
8
8
  const Wrapper = styled.div`
9
9
  background: ${({ theme, backgroundColor }) => theme.color(backgroundColor)};
@@ -13,7 +13,7 @@ const Container = styled.div`
13
13
  text-align: center;
14
14
  padding: calc(${spacing('m')} * 2) ${spacing('m')};
15
15
  margin: 0 auto;
16
- max-width: ${screen.large};
16
+ max-width: ${sizes.XL}px;
17
17
 
18
18
  @media ${({ theme }) => theme.allBreakpoints('M')} {
19
19
  padding: ${spacing('xl')} ${spacing('l')};
@@ -1,5 +1,5 @@
1
1
  import styled, { css } from 'styled-components';
2
- import container from '../../../theme/shared/allContainers';
2
+ import allContainers from '../../../theme/shared/allContainers';
3
3
  import spacing from '../../../theme/shared/spacing';
4
4
  import zIndex from '../../../theme/shared/zIndex';
5
5
 
@@ -37,7 +37,7 @@ const Container = styled.div`
37
37
 
38
38
  const Wrapper = styled.div`
39
39
  width: 100%;
40
- max-width: ${container.medium};
40
+ max-width: ${allContainers.medium};
41
41
  height: 100%;
42
42
  left: 0;
43
43
  right: 0;
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from 'styled-components';
2
2
  import spacing from '../../../theme/shared/spacing';
3
- import container from '../../../theme/shared/allContainers';
3
+ import allContainers from '../../../theme/shared/allContainers';
4
4
  import zIndex from '../../../theme/shared/zIndex';
5
5
  import playIcon from './assets/video--play-icon.svg';
6
6
  import playIconHover from './assets/video--play-icon__hover.svg';
@@ -68,7 +68,7 @@ const Copy = styled.div`
68
68
  : css`
69
69
  @media ${({ theme }) => theme.allBreakpoints('M')} {
70
70
  width: 100%;
71
- max-width ${container.small};
71
+ max-width ${allContainers.small};
72
72
  padding: ${spacing('xl')};
73
73
  }
74
74
  margin: auto;
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
2
2
  import { useMediaQuery } from 'react-responsive';
3
3
  import PropTypes from 'prop-types';
4
4
 
5
- import { screen } from '../../../theme/shared/size';
5
+ import { sizes } from '../../../theme/shared/allBreakpoints';
6
6
  import Text from '../../Atoms/Text/Text';
7
7
  import Picture from '../../Atoms/Picture/Picture';
8
8
  import Form from './Form/Form';
@@ -53,7 +53,7 @@ const Donate = ({
53
53
  monthlyChooseAmountText: monthlyChoose,
54
54
  monthlyOtherAmountText: monthlyOther
55
55
  }) => {
56
- let isDesktop = useMediaQuery({ query: `(min-width: ${screen.medium})` });
56
+ let isDesktop = useMediaQuery({ query: `(min-width: ${sizes.L}px)` });
57
57
 
58
58
  // To let us store any updated override, and force a re-render
59
59
  const [overrideValue, setOverrideValue] = useState(null);
@@ -1,7 +1,7 @@
1
1
  import styled from 'styled-components';
2
2
 
3
3
  import zIndex from '../../../theme/shared/zIndex';
4
- import container from '../../../theme/shared/allContainers';
4
+ import allContainers from '../../../theme/shared/allContainers';
5
5
  import spacing from '../../../theme/shared/spacing';
6
6
 
7
7
  const HeaderWrapper = styled.header.attrs(() => ({
@@ -23,7 +23,7 @@ const InnerWrapper = styled.div`
23
23
  height: 100%;
24
24
  padding: 0 12px;
25
25
  cursor: pointer;
26
- max-width: ${container.large};
26
+ max-width: ${allContainers.large};
27
27
 
28
28
  @media ${({ theme }) => theme.allBreakpoints('Nav')} {
29
29
  margin: 0 auto;
@@ -3,7 +3,6 @@ import styled from 'styled-components';
3
3
  import Link from '../../../Atoms/Link/Link';
4
4
  import hideVisually from '../../../../theme/shared/hideVisually';
5
5
  import zIndex from '../../../../theme/shared/zIndex';
6
- import { screen } from '../../../../theme/shared/size';
7
6
 
8
7
  const NavLinkClass = styled(Link)`
9
8
  display: inline-block;
@@ -32,7 +31,7 @@ const Nav = styled.nav`
32
31
  left: 0;
33
32
  ${zIndex('higher')};
34
33
 
35
- @media (min-width: ${screen.small}) {
34
+ @media ${({ theme }) => theme.allBreakpoints('M')} {
36
35
  width: 50%;
37
36
  right: 0;
38
37
  left: inherit;
package/src/index.js CHANGED
@@ -11,6 +11,7 @@ export { default as spacing } from './theme/shared/spacing';
11
11
  export { default as breakpoint } from './theme/shared/breakpoint';
12
12
  export { default as allBreakpoints } from './theme/shared/allBreakpoints';
13
13
  export { media, screen, container } from './theme/shared/size';
14
+ export { default as allContainers } from './theme/shared/allContainers';
14
15
 
15
16
  /* Atoms */
16
17
  export { default as Text } from './components/Atoms/Text/Text';
@@ -1,3 +1,7 @@
1
+ /**
2
+ * For usage and examples see utils.md
3
+ */
4
+
1
5
  export const sizes = {
2
6
  S: 0,
3
7
  M: 740,
@@ -1,7 +1,7 @@
1
- const container = {
1
+ const allContainers = {
2
2
  small: '880px',
3
3
  medium: '1200px',
4
4
  large: '1440px'
5
5
  };
6
6
 
7
- export default container;
7
+ export default allContainers;