@comicrelief/component-library 8.41.0 → 8.43.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.
@@ -10,6 +10,7 @@ var _buttonColors = _interopRequireDefault(require("./buttonColors"));
10
10
  var _linkStyles = _interopRequireDefault(require("./linkStyles"));
11
11
  var _fontSizes = _interopRequireDefault(require("./fontSizes"));
12
12
  var _allBreakpoints = _interopRequireDefault(require("../shared/allBreakpoints"));
13
+ var _breakpoints = _interopRequireDefault(require("../shared/breakpoints2026"));
13
14
  var _fontFamilies = _interopRequireDefault(require("../shared/fontFamilies"));
14
15
  var _default = exports.default = {
15
16
  color: _colors.default,
@@ -17,6 +18,7 @@ var _default = exports.default = {
17
18
  linkStyles: _linkStyles.default,
18
19
  fontSize: _fontSizes.default,
19
20
  allBreakpoints: _allBreakpoints.default,
21
+ breakpoints2026: _breakpoints.default,
20
22
  fontFamilies: _fontFamilies.default,
21
23
  font: {
22
24
  regular: 'Montserrat',
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.breakpointValues2026 = void 0;
7
+ /**
8
+ * Example Usage
9
+
10
+ Make height: 200px from 1024px onwards:
11
+
12
+ @media ${({ theme }) => theme.breakpoints2026('L')} {
13
+ height: 200px;
14
+ }
15
+
16
+ */
17
+
18
+ const breakpointValues2026 = exports.breakpointValues2026 = {
19
+ XS: 0,
20
+ S: 320,
21
+ M: 740,
22
+ L: 1024,
23
+ XL: 1440
24
+ };
25
+ var _default = size => {
26
+ if (size) {
27
+ return `(min-width: ${breakpointValues2026[size]}px)`;
28
+ }
29
+ return 'inherit';
30
+ };
31
+ exports.default = _default;
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": "8.41.0",
4
+ "version": "8.43.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -3,6 +3,8 @@ import buttonColors from './buttonColors';
3
3
  import linkStyles from './linkStyles';
4
4
  import fontSize from './fontSizes';
5
5
  import allBreakpoints from '../shared/allBreakpoints';
6
+ import breakpoints2026 from '../shared/breakpoints2026';
7
+
6
8
  import fontFamilies from '../shared/fontFamilies';
7
9
 
8
10
  export default {
@@ -11,6 +13,7 @@ export default {
11
13
  linkStyles,
12
14
  fontSize,
13
15
  allBreakpoints,
16
+ breakpoints2026,
14
17
  fontFamilies,
15
18
  font: {
16
19
  regular: 'Montserrat',
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Example Usage
3
+
4
+ Make height: 200px from 1024px onwards:
5
+
6
+ @media ${({ theme }) => theme.breakpoints2026('L')} {
7
+ height: 200px;
8
+ }
9
+
10
+ */
11
+
12
+ export const breakpointValues2026 = {
13
+ XS: 0,
14
+ S: 320,
15
+ M: 740,
16
+ L: 1024,
17
+ XL: 1440
18
+ };
19
+
20
+ export default size => {
21
+ if (size) {
22
+ return `(min-width: ${breakpointValues2026[size]}px)`;
23
+ }
24
+ return 'inherit';
25
+ };