@conduction/components 2.1.16 → 2.1.17

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/README.md CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  - **Version 2.1 (breaking changes from 2.0.x)**
6
6
 
7
+ - 2.1.17: Refactor to NotificationPopUp to include layoutClassName.
7
8
  - 2.1.16: Refactor ToolTip layoutClassName placement.
8
9
  - 2.1.15: Add InputDate component based on react-datepicker.
9
10
  - 2.1.14: Refactor checkbox to remove svg errors
@@ -8,11 +8,13 @@ export interface NotificationPopUpProps {
8
8
  label: string;
9
9
  icon?: JSX.Element;
10
10
  handleClick: () => any;
11
+ layoutClassName?: string;
11
12
  };
12
13
  secondaryButton?: {
13
14
  label: string;
14
15
  icon?: JSX.Element;
15
16
  handleClick: () => any;
17
+ layoutClassName?: string;
16
18
  };
17
19
  layoutClassName?: string;
18
20
  }
@@ -16,7 +16,7 @@ export const NotificationPopUp = ({ title, description, isVisible, hide, primary
16
16
  setAnimationVisible(true);
17
17
  }, animationDuration);
18
18
  };
19
- const modal = (_jsx(StylesProvider, { children: _jsxs("div", { style: { animationDuration: `${animationDuration}ms` }, className: clsx(styles.modal, animationVisible && styles.visible, layoutClassName), children: [_jsx(Heading3, { children: title }), _jsx(Paragraph, { children: description }), _jsxs("div", { className: styles.buttons, children: [secondaryButton && (_jsx("div", { onClick: () => handleClick(secondaryButton.handleClick), children: _jsx(Link, { icon: secondaryButton.icon ?? _jsx(CloseIcon, {}), iconAlign: "start", children: secondaryButton.label }) })), _jsx(Button, { icon: primaryButton.icon ?? _jsx(ArrowRightIcon, {}), onClick: () => handleClick(primaryButton.handleClick), children: primaryButton.label })] })] }) }));
19
+ const modal = (_jsx(StylesProvider, { children: _jsxs("div", { style: { animationDuration: `${animationDuration}ms` }, className: clsx(styles.modal, animationVisible && styles.visible, layoutClassName), children: [_jsx(Heading3, { children: title }), _jsx(Paragraph, { children: description }), _jsxs("div", { className: styles.buttons, children: [secondaryButton && (_jsx("div", { onClick: () => handleClick(secondaryButton.handleClick), className: secondaryButton.layoutClassName, children: _jsx(Link, { icon: secondaryButton.icon ?? _jsx(CloseIcon, {}), iconAlign: "start", children: secondaryButton.label }) })), _jsx(Button, { icon: primaryButton.icon ?? _jsx(ArrowRightIcon, {}), onClick: () => handleClick(primaryButton.handleClick), className: primaryButton.layoutClassName, children: primaryButton.label })] })] }) }));
20
20
  return isVisible ? ReactDOM.createPortal(modal, document.body) : null;
21
21
  };
22
22
  export const NotificationPopUpController = () => {
@@ -39,7 +39,7 @@
39
39
  @keyframes fadeInBottom {
40
40
  from {
41
41
  opacity: 0;
42
- transform: translateY(100%);
42
+ transform: translateY(50%);
43
43
  }
44
44
  to {
45
45
  opacity: 1;
@@ -56,6 +56,6 @@
56
56
  }
57
57
  to {
58
58
  opacity: 0;
59
- transform: translateY(100%);
59
+ transform: translateY(50%);
60
60
  }
61
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/components",
3
- "version": "2.1.16",
3
+ "version": "2.1.17",
4
4
  "description": "React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -39,7 +39,7 @@
39
39
  @keyframes fadeInBottom {
40
40
  from {
41
41
  opacity: 0;
42
- transform: translateY(100%);
42
+ transform: translateY(50%);
43
43
  }
44
44
  to {
45
45
  opacity: 1;
@@ -56,6 +56,6 @@
56
56
  }
57
57
  to {
58
58
  opacity: 0;
59
- transform: translateY(100%);
59
+ transform: translateY(50%);
60
60
  }
61
61
  }
@@ -14,11 +14,13 @@ export interface NotificationPopUpProps {
14
14
  label: string;
15
15
  icon?: JSX.Element;
16
16
  handleClick: () => any;
17
+ layoutClassName?: string;
17
18
  };
18
19
  secondaryButton?: {
19
20
  label: string;
20
21
  icon?: JSX.Element;
21
22
  handleClick: () => any;
23
+ layoutClassName?: string;
22
24
  };
23
25
  layoutClassName?: string;
24
26
  }
@@ -52,18 +54,22 @@ export const NotificationPopUp: React.FC<NotificationPopUpProps> = ({
52
54
  className={clsx(styles.modal, animationVisible && styles.visible, layoutClassName)}
53
55
  >
54
56
  <Heading3>{title}</Heading3>
57
+
55
58
  <Paragraph>{description}</Paragraph>
59
+
56
60
  <div className={styles.buttons}>
57
61
  {secondaryButton && (
58
- <div onClick={() => handleClick(secondaryButton.handleClick)}>
62
+ <div onClick={() => handleClick(secondaryButton.handleClick)} className={secondaryButton.layoutClassName}>
59
63
  <Link icon={secondaryButton.icon ?? <CloseIcon />} iconAlign="start">
60
64
  {secondaryButton.label}
61
65
  </Link>
62
66
  </div>
63
67
  )}
68
+
64
69
  <Button
65
70
  icon={primaryButton.icon ?? <ArrowRightIcon />}
66
71
  onClick={() => handleClick(primaryButton.handleClick)}
72
+ className={primaryButton.layoutClassName}
67
73
  >
68
74
  {primaryButton.label}
69
75
  </Button>