@comicrelief/component-library 6.5.0 → 6.6.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.
@@ -25,11 +25,12 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
25
25
 
26
26
  /* eslint-disable */
27
27
  var fadeClose = (0, _styledComponents.keyframes)(["0%{opacity:1;max-height:350px;}100%{opacity:0;max-height:0px;display:none;margin-top:-16px;}"]);
28
+ var fadeOpen = (0, _styledComponents.keyframes)(["0%{opacity:0;max-height:0px;display:none;margin-top:-16px;}100%{opacity:1;max-height:350px;}"]);
28
29
 
29
30
  var StyledPopUp = _styledComponents.default.div.withConfig({
30
31
  displayName: "PopUpComponent__StyledPopUp",
31
32
  componentId: "sc-1d7imlo-0"
32
- })(["display:grid;overflow:hidden;max-height:350px;opacity:1;", " background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);border-radius:10px;", "{width:450px;margin-right:auto;margin-left:auto;}"], function (props) {
33
+ })(["display:grid;overflow:hidden;max-height:350px;opacity:1;animation:0.4s ", " ease;", " background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);border-radius:10px;", "{width:450px;margin-right:auto;margin-left:auto;}"], fadeOpen, function (props) {
33
34
  return props.isClosed && (0, _styledComponents.css)(["animation:0.6s ", " ease forwards;"], fadeClose);
34
35
  }, function (_ref) {
35
36
  var theme = _ref.theme;
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.5.0",
4
+ "version": "6.6.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -19,11 +19,25 @@ const fadeClose = keyframes`
19
19
  }
20
20
  `;
21
21
 
22
+ const fadeOpen = keyframes`
23
+ 0% {
24
+ opacity: 0;
25
+ max-height: 0px;
26
+ display: none;
27
+ margin-top: -16px;
28
+ }
29
+ 100% {
30
+ opacity: 1;
31
+ max-height: 350px;
32
+ }
33
+ `;
34
+
22
35
  const StyledPopUp = styled.div`
23
36
  display: grid;
24
37
  overflow: hidden;
25
38
  max-height: 350px;
26
39
  opacity: 1;
40
+ animation: 0.4s ${fadeOpen} ease;
27
41
  ${props => props.isClosed && css`
28
42
  animation: 0.6s ${fadeClose} ease forwards;
29
43
  `}
@@ -50,7 +64,6 @@ const Button = styled.button`
50
64
  width: 30px;
51
65
  height: 30px;
52
66
  margin: 3px;
53
-
54
67
  :active,
55
68
  :focus,
56
69
  :hover {