@onsvisual/svelte-components 1.0.19 → 1.0.20
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.
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
export let page = getContext("page");
|
|
16
16
|
/**
|
|
17
17
|
* Optional: Explicitly pass a page status number, eg. 404 or 500.
|
|
18
|
-
* @type {number}
|
|
18
|
+
* @type {number|null}
|
|
19
19
|
*/
|
|
20
|
-
export let status =
|
|
20
|
+
export let status = page?.status || null;
|
|
21
21
|
/**
|
|
22
22
|
* Optional: Explicitly pass a page status message.
|
|
23
|
-
* @type {string}
|
|
23
|
+
* @type {string|null}
|
|
24
24
|
*/
|
|
25
|
-
export let message =
|
|
25
|
+
export let message = page?.error?.message || null;
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<Container {width}>
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/** @typedef {typeof __propDef.slots} ErrorPageSlots */
|
|
4
4
|
export default class ErrorPage extends SvelteComponentTyped<{
|
|
5
5
|
width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
|
|
6
|
-
message?: string | undefined;
|
|
6
|
+
message?: string | null | undefined;
|
|
7
7
|
page?: any;
|
|
8
|
-
status?: number | undefined;
|
|
8
|
+
status?: number | null | undefined;
|
|
9
9
|
}, {
|
|
10
10
|
[evt: string]: CustomEvent<any>;
|
|
11
11
|
}, {}> {
|
|
@@ -17,9 +17,9 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
17
17
|
declare const __propDef: {
|
|
18
18
|
props: {
|
|
19
19
|
width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
|
|
20
|
-
message?: string | undefined;
|
|
20
|
+
message?: string | null | undefined;
|
|
21
21
|
page?: any;
|
|
22
|
-
status?: number | undefined;
|
|
22
|
+
status?: number | null | undefined;
|
|
23
23
|
};
|
|
24
24
|
events: {
|
|
25
25
|
[evt: string]: CustomEvent<any>;
|