@factorearth/component-library 5.0.17-alpha.0 → 5.0.19-alpha.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.
@@ -6,6 +6,8 @@ interface ErrorSplashProps {
6
6
  description: string;
7
7
  image?: string;
8
8
  backgroundImage: string;
9
+ errorMessage?: string;
10
+ refreshOnClick: () => void;
9
11
  }
10
12
  export declare const ErrorSplash: (props: ErrorSplashProps) => React.JSX.Element;
11
13
  export {};
@@ -1,5 +1,7 @@
1
1
  import React from "react";
2
2
  import styled from "@emotion/styled";
3
+ import { FiRefreshCw } from "react-icons/fi";
4
+ import { Button } from "../../Atoms/Buttons/Button";
3
5
  import { Typography } from "../../Atoms/Typography/Typography";
4
6
  const ErrorSplashContainer = styled.div `
5
7
  background-color: ${({ colorPalette }) => colorPalette.background.primary};
@@ -20,13 +22,6 @@ const HeaderDiv = styled.div `
20
22
  text-align: center;
21
23
  border-color: ${({ colorPalette }) => colorPalette.background.secondary};
22
24
  `;
23
- // const HeaderAndBackDiv = styled.div<{ colorPalette: Colors }>`
24
- // display: flex;
25
- // justify-content: space-between;
26
- // align-items: center;
27
- // align-self: stretch;
28
- // text-align: right;
29
- // `;
30
25
  const DescriptionDiv = styled.div `
31
26
  margin-top: 24px;
32
27
  text-align: center;
@@ -41,8 +36,8 @@ const BackgroundDiv = styled.div `
41
36
  flex-shrink: 0;
42
37
  align-self: stretch;
43
38
  flex-wrap: wrap;
44
- background-image: ${({ backgroundImage }) => `url(${backgroundImage})`};
45
39
  flex-grow: 1;
40
+ background-image: ${({ backgroundImage }) => `url(${backgroundImage})`};
46
41
  backgroundSize: cover;
47
42
  backgroundRepeat: no-repeat;
48
43
  overflowY: auto;
@@ -69,14 +64,16 @@ const ContactContainer = styled.div `
69
64
  align-self: stretch;
70
65
  `;
71
66
  export const ErrorSplash = (props) => {
72
- const { colorPalette, title, description, image, backgroundImage, ...tableHtmlProps } = props;
67
+ const { colorPalette, title, description, image, backgroundImage, errorMessage, refreshOnClick, ...tableHtmlProps } = props;
73
68
  return (React.createElement(ErrorSplashContainer, { colorPalette: colorPalette, ...tableHtmlProps },
74
69
  React.createElement(HeaderDiv, { colorPalette: colorPalette },
75
70
  React.createElement(Typography, { textColor: colorPalette.text.primary, content: title, variant: "Heading 3" }),
76
71
  React.createElement(DescriptionDiv, { colorPalette: colorPalette },
77
- React.createElement(Typography, { textColor: colorPalette.text.primary, content: description, variant: "Paragraphy Body" }))),
72
+ React.createElement(Typography, { textColor: colorPalette.text.primary, content: description, variant: "Paragraphy Body" }),
73
+ React.createElement(Typography, { textColor: colorPalette.text.primary, content: `Error Message: ${errorMessage}`, variant: "Paragraphy Body" }))),
78
74
  image && React.createElement("img", { src: image, alt: "Splash Image" }),
79
- React.createElement(BackgroundDiv, { colorPalette: colorPalette, backgroundImage: backgroundImage }),
75
+ React.createElement(BackgroundDiv, { colorPalette: colorPalette, backgroundImage: backgroundImage },
76
+ React.createElement(Button, { colorPalette: colorPalette, onClick: refreshOnClick, label: "Refresh to Try Again", variant: "outlined", icon: React.createElement(FiRefreshCw, null) })),
80
77
  React.createElement(ContactContainer, { colors: colorPalette },
81
78
  React.createElement(Typography, { textColor: colorPalette.text.primary, content: "Please ask further questions, or reach out for additional support by emailing", variant: "Label" }),
82
79
  React.createElement(Typography, { textColor: colorPalette.text.primary, content: "devs@factorearth.com", variant: "Heading 4" }))));
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorSplash.js","sourceRoot":"","sources":["../../../lib/Organisms/ErrorSplash/ErrorSplash.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAA0B;qBAC5C,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,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AC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,GAAI;YAC1F,oBAAC,cAAc,IAAC,YAAY,EAAE,YAAY;gBACzC,oBAAC,UAAU,IAAC,SAAS,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB,GAAI;gBACtG,oBAAC,UAAU,IAAC,SAAS,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,kBAAkB,YAAY,EAAE,EAAE,OAAO,EAAE,iBAAiB,GAAI,CAC3G,CACN;QACX,KAAK,IAAI,6BAAK,GAAG,EAAE,KAAK,EAAE,GAAG,EAAC,cAAc,GAAG;QAChD,oBAAC,aAAa,IAAC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe;YAE1E,oBAAC,MAAM,IAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAC,sBAAsB,EAAC,OAAO,EAAC,UAAU,EAAC,IAAI,EAAE,oBAAC,WAAW,OAAE,GAAG,CAErH;QAKhB,oBAAC,gBAAgB,IAAC,MAAM,EAAE,YAAY;YACrC,oBAAC,UAAU,IAAC,SAAS,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,+EAA+E,EAAE,OAAO,EAAE,OAAO,GAAI;YAChK,oBAAC,UAAU,IAAC,SAAS,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,WAAW,GAAI,CACzF,CACG,CACvB,CAAC;AACH,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorearth/component-library",
3
- "version": "5.0.17-alpha.0",
3
+ "version": "5.0.19-alpha.0",
4
4
  "description": " A storybook component library for FactorEarth",
5
5
  "author": "madtrx <marlin.makori@gmail.com>",
6
6
  "homepage": "https://github.com/FactorEarth/RecordMiddleware#readme",
@@ -46,7 +46,7 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.org/"
48
48
  },
49
- "gitHead": "4414b4fe8844f7ccc7ddeb99ad3eac7f719de712",
49
+ "gitHead": "b107474213b166645cca031b1cba055a0e3f10a3",
50
50
  "dependencies": {
51
51
  "@emotion/react": "^11.13.0",
52
52
  "@emotion/styled": "^11.13.0",