@factorearth/component-library 6.6.4 → 6.6.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.
|
@@ -2,12 +2,10 @@ import React from "react";
|
|
|
2
2
|
import { Colors } from "Theme/types";
|
|
3
3
|
interface ErrorSplashProps {
|
|
4
4
|
colorPalette: Colors & string;
|
|
5
|
-
title: string;
|
|
6
|
-
description: string;
|
|
7
|
-
image?: string;
|
|
8
5
|
backgroundImage: string;
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
onFAQ?: () => void;
|
|
7
|
+
onTryAgain?: () => void;
|
|
8
|
+
onReportBug?: () => void;
|
|
11
9
|
}
|
|
12
10
|
export declare const ErrorSplash: (props: ErrorSplashProps) => React.JSX.Element;
|
|
13
11
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
|
-
import { FiRefreshCw } from "react-icons/fi";
|
|
3
|
+
import { FiRefreshCw, FiHelpCircle } from "react-icons/fi";
|
|
4
4
|
import { Button } from "../../Atoms/Buttons/Button";
|
|
5
|
+
import { ReportABugButton } from "../../Atoms/Buttons/ReportABugButton";
|
|
5
6
|
import { Typography } from "../../Atoms/Typography/Typography";
|
|
6
7
|
const ErrorSplashContainer = styled.div `
|
|
7
8
|
background-color: ${({ colorPalette }) => colorPalette.background.primary};
|
|
@@ -26,6 +27,14 @@ const DescriptionDiv = styled.div `
|
|
|
26
27
|
margin-top: 24px;
|
|
27
28
|
text-align: center;
|
|
28
29
|
`;
|
|
30
|
+
const ActionsDiv = styled.div `
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: row;
|
|
33
|
+
flex-wrap: wrap;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
gap: 12px;
|
|
36
|
+
margin-top: 16px;
|
|
37
|
+
`;
|
|
29
38
|
const BackgroundDiv = styled.div `
|
|
30
39
|
display: flex;
|
|
31
40
|
height: 245px;
|
|
@@ -64,15 +73,17 @@ const ContactContainer = styled.div `
|
|
|
64
73
|
align-self: stretch;
|
|
65
74
|
`;
|
|
66
75
|
export const ErrorSplash = (props) => {
|
|
67
|
-
const { colorPalette,
|
|
76
|
+
const { colorPalette, backgroundImage, onFAQ, onTryAgain, onReportBug, ...tableHtmlProps } = props;
|
|
68
77
|
return (React.createElement(ErrorSplashContainer, { colorPalette: colorPalette, ...tableHtmlProps },
|
|
69
78
|
React.createElement(HeaderDiv, { colorPalette: colorPalette },
|
|
70
|
-
React.createElement(Typography, { textColor: colorPalette.text.primary, content:
|
|
79
|
+
React.createElement(Typography, { textColor: colorPalette.text.primary, content: "Oops something went wrong!", variant: "Heading 3" }),
|
|
71
80
|
React.createElement(DescriptionDiv, { colorPalette: colorPalette },
|
|
72
|
-
React.createElement(Typography, { textColor: colorPalette.text.primary, content:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
React.createElement(Typography, { textColor: colorPalette.text.primary, content: "An unexpected error occurred. You can try again, or report the issue if it persists.", variant: "Paragraphy Body" }),
|
|
82
|
+
(onFAQ || onTryAgain || onReportBug) && (React.createElement(ActionsDiv, null,
|
|
83
|
+
onFAQ && React.createElement(Button, { colorPalette: colorPalette, onClick: onFAQ, label: "FAQ", variant: "outlined", icon: React.createElement(FiHelpCircle, null) }),
|
|
84
|
+
onTryAgain && React.createElement(Button, { colorPalette: colorPalette, onClick: onTryAgain, label: "Try Again", variant: "outlined", icon: React.createElement(FiRefreshCw, null) }),
|
|
85
|
+
onReportBug && React.createElement(ReportABugButton, { colorPalette: colorPalette, variant: "outlined", onClick: onReportBug }))))),
|
|
86
|
+
React.createElement(BackgroundDiv, { colorPalette: colorPalette, backgroundImage: backgroundImage }),
|
|
76
87
|
React.createElement(ContactContainer, { colors: colorPalette },
|
|
77
88
|
React.createElement(Typography, { textColor: colorPalette.text.primary, content: "Please ask further questions, or reach out for additional support by emailing", variant: "Label" }),
|
|
78
89
|
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,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorSplash.js","sourceRoot":"","sources":["../../../lib/Organisms/ErrorSplash/ErrorSplash.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,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,CAAC,OAAO;;;;;CAKzE,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAA0B;;;;;;UAM5C,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO;;;;iBAIxC,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,SAAS;CACvE,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAA0B;;;CAG1D,CAAC;AAEF,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;CAO5B,CAAC;AAEF,MAAM,aA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AE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAC,KAAK,EAAC,OAAO,EAAC,UAAU,EAAC,IAAI,EAAE,oBAAC,YAAY,OAAG,GAAI;oBACtH,UAAU,IAAI,oBAAC,MAAM,IAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAC,WAAW,EAAC,OAAO,EAAC,UAAU,EAAC,IAAI,EAAE,oBAAC,WAAW,OAAG,GAAI;oBACrI,WAAW,IAAI,oBAAC,gBAAgB,IAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAC,UAAU,EAAC,OAAO,EAAE,WAAW,GAAI,CAC7F,CACb,CACe,CACN;QACZ,oBAAC,aAAa,IAAC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,GAAI;QAK/E,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": "6.6.
|
|
3
|
+
"version": "6.6.5",
|
|
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",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"access": "public",
|
|
48
48
|
"registry": "https://registry.npmjs.org/"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "5724b3887edf04166eede68965af21607e0ef8ef",
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@emotion/react": "^11.13.0",
|
|
53
53
|
"@emotion/styled": "^11.13.0",
|