@comicrelief/component-library 6.1.3 → 6.1.5

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.
package/.eslintrc CHANGED
@@ -35,5 +35,6 @@
35
35
  },
36
36
  "globals": {
37
37
  "window": true
38
- }
38
+ },
39
+ "ignorePatterns": ["**/*.test.js"]
39
40
  }
@@ -33,7 +33,7 @@ var Image = _styledComponents.default.img.withConfig({
33
33
  var LogoWrapper = _styledComponents.default.div.withConfig({
34
34
  displayName: "Logo__LogoWrapper",
35
35
  componentId: "sc-18yiye8-1"
36
- })(["display:inline-block;", " width:", ";transform:", ";@media ", "{width:", ";}"], (0, _zIndex.default)('high'), function (props) {
36
+ })(["display:inline-block;", " width:", ";transform:", ";vertical-align:bottom;@media ", "{width:", ";}"], (0, _zIndex.default)('high'), function (props) {
37
37
  return props.sizeSm;
38
38
  }, function (props) {
39
39
  return props.rotate ? 'rotate(-14deg)' : 'inherit';
@@ -74,8 +74,9 @@ var Logo = function Logo(_ref2) {
74
74
 
75
75
  Logo.defaultProps = {
76
76
  rotate: false,
77
- sizeSm: '50px',
78
- sizeMd: '60px',
77
+ sizeSm: '51px',
78
+ // - to work with the header 75px height and 12px padding
79
+ sizeMd: '70px',
79
80
  campaign: 'Comic Relief'
80
81
  };
81
82
  var _default = Logo;
@@ -10,9 +10,9 @@ var _shallowWithTheme = _interopRequireDefault(require("../../../hoc/shallowWith
10
10
 
11
11
  var _Logo = _interopRequireDefault(require("./Logo"));
12
12
 
13
- it('renders correctly', function () {
13
+ it("renders correctly", function () {
14
14
  var tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_Logo.default, {
15
15
  rotate: true
16
16
  })).toJSON();
17
- expect(tree).toMatchInlineSnapshot("\n .c1 {\n object-fit: cover;\n width: 100%;\n display: block;\n height: auto;\n margin-right: 1rem;\n }\n\n .c0 {\n display: inline-block;\n z-index: 3;\n width: 50px;\n -webkit-transform: rotate(-14deg);\n -ms-transform: rotate(-14deg);\n transform: rotate(-14deg);\n }\n\n @media (min-width:1150px) {\n .c0 {\n width: 60px;\n }\n }\n\n <div\n className=\"c0\"\n rotate={1}\n >\n <img\n alt=\"Comic Relief logo\"\n className=\"c1\"\n src=\"mock.asset\"\n />\n </div>\n ");
17
+ expect(tree).toMatchInlineSnapshot("\n .c1 {\n object-fit: cover;\n width: 100%;\n display: block;\n height: auto;\n margin-right: 1rem;\n }\n\n .c0 {\n display: inline-block;\n z-index: 3;\n width: 51px;\n -webkit-transform: rotate(-14deg);\n -ms-transform: rotate(-14deg);\n transform: rotate(-14deg);\n vertical-align: bottom;\n }\n\n @media (min-width:1150px) {\n .c0 {\n width: 70px;\n }\n }\n\n <div\n className=\"c0\"\n rotate={1}\n >\n <img\n alt=\"Comic Relief logo\"\n className=\"c1\"\n src=\"mock.asset\"\n />\n </div>\n ");
18
18
  });
@@ -51,6 +51,7 @@ exports[`renders correctly 1`] = `
51
51
  -webkit-transform: inherit;
52
52
  -ms-transform: inherit;
53
53
  transform: inherit;
54
+ vertical-align: bottom;
54
55
  }
55
56
 
56
57
  .c8 {
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": "6.1.3",
4
+ "version": "6.1.5",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -25,6 +25,7 @@ const LogoWrapper = styled.div`
25
25
  ${zIndex('high')}
26
26
  width: ${props => props.sizeSm};
27
27
  transform: ${props => (props.rotate ? 'rotate(-14deg)' : 'inherit')};
28
+ vertical-align: bottom; // height fix
28
29
  @media ${({ theme }) => theme.breakpoint('nav')} {
29
30
  width: ${props => props.sizeMd};
30
31
  }
@@ -66,8 +67,8 @@ Logo.propTypes = {
66
67
 
67
68
  Logo.defaultProps = {
68
69
  rotate: false,
69
- sizeSm: '50px',
70
- sizeMd: '60px',
70
+ sizeSm: '51px', // - to work with the header 75px height and 12px padding
71
+ sizeMd: '70px',
71
72
  campaign: 'Comic Relief'
72
73
  };
73
74
 
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
- import 'jest-styled-components';
3
- import renderWithTheme from '../../../hoc/shallowWithTheme';
4
- import Logo from './Logo';
1
+ import React from "react";
2
+ import "jest-styled-components";
3
+ import renderWithTheme from "../../../hoc/shallowWithTheme";
4
+ import Logo from "./Logo";
5
5
 
6
- it('renders correctly', () => {
6
+ it("renders correctly", () => {
7
7
  const tree = renderWithTheme(<Logo rotate />).toJSON();
8
8
 
9
9
  expect(tree).toMatchInlineSnapshot(`
@@ -18,15 +18,16 @@ it('renders correctly', () => {
18
18
  .c0 {
19
19
  display: inline-block;
20
20
  z-index: 3;
21
- width: 50px;
21
+ width: 51px;
22
22
  -webkit-transform: rotate(-14deg);
23
23
  -ms-transform: rotate(-14deg);
24
24
  transform: rotate(-14deg);
25
+ vertical-align: bottom;
25
26
  }
26
27
 
27
28
  @media (min-width:1150px) {
28
29
  .c0 {
29
- width: 60px;
30
+ width: 70px;
30
31
  }
31
32
  }
32
33
 
@@ -51,6 +51,7 @@ exports[`renders correctly 1`] = `
51
51
  -webkit-transform: inherit;
52
52
  -ms-transform: inherit;
53
53
  transform: inherit;
54
+ vertical-align: bottom;
54
55
  }
55
56
 
56
57
  .c8 {