ferns-ui 0.38.0 → 0.38.1
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/dist/Page.d.ts +1 -0
- package/dist/Page.js +1 -1
- package/dist/Page.js.map +1 -1
- package/package.json +1 -1
- package/src/Page.tsx +2 -1
package/dist/Page.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ interface PageProps {
|
|
|
17
17
|
rightButton?: string;
|
|
18
18
|
rightButtonOnClick?: () => void;
|
|
19
19
|
children?: any;
|
|
20
|
+
onError?: (error: Error, stack: any) => void;
|
|
20
21
|
}
|
|
21
22
|
export declare class Page extends React.Component<PageProps, {}> {
|
|
22
23
|
actionSheetRef: React.RefObject<any>;
|
package/dist/Page.js
CHANGED
|
@@ -25,7 +25,7 @@ export class Page extends React.Component {
|
|
|
25
25
|
React.createElement(Button, { color: "gray", text: this.props.rightButton, type: "ghost", onClick: () => this.props.rightButtonOnClick && this.props.rightButtonOnClick() })))));
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (React.createElement(ErrorBoundary,
|
|
28
|
+
return (React.createElement(ErrorBoundary, { onError: this.props.onError },
|
|
29
29
|
React.createElement(Box, { alignSelf: "center", avoidKeyboard: true, color: this.props.color || "lightGray", direction: this.props.direction || "column", display: this.props.display || "flex", flex: "grow", keyboardOffset: this.props.keyboardOffset, maxWidth: this.props.maxWidth || 800, padding: this.props.padding !== undefined ? this.props.padding : 2, scroll: this.props.scroll === undefined ? true : this.props.scroll, width: "100%" },
|
|
30
30
|
this.renderHeader(),
|
|
31
31
|
this.props.loading === true && React.createElement(Spinner, { color: "darkGray", size: "md" }),
|
package/dist/Page.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../src/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,C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AAK,CAAC,SAAS,IAAI,QAAQ,EAC3C,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,MAAM,EACrC,IAAI,EAAC,QAAQ,EACb,YAAY,EAAE,CAAC,EACf,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,GAAG,EACpC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EACnE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EACnE,KAAK,EAAC,MAAM,IAEX,IAAI,CAAC,KAAK,CAAC,MAAM,CACd,CACP,CACa,CACjB,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
package/src/Page.tsx
CHANGED
|
@@ -26,6 +26,7 @@ interface PageProps {
|
|
|
26
26
|
rightButton?: string;
|
|
27
27
|
rightButtonOnClick?: () => void;
|
|
28
28
|
children?: any;
|
|
29
|
+
onError?: (error: Error, stack: any) => void;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
export class Page extends React.Component<PageProps, {}> {
|
|
@@ -82,7 +83,7 @@ export class Page extends React.Component<PageProps, {}> {
|
|
|
82
83
|
|
|
83
84
|
render() {
|
|
84
85
|
return (
|
|
85
|
-
<ErrorBoundary>
|
|
86
|
+
<ErrorBoundary onError={this.props.onError}>
|
|
86
87
|
<Box
|
|
87
88
|
alignSelf="center"
|
|
88
89
|
avoidKeyboard
|