Skip to content

Commit

Permalink
export error page #119
Browse files Browse the repository at this point in the history
  • Loading branch information
ukorvl committed Oct 26, 2023
1 parent c2bd62f commit bdcdc02
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion src/components/error-page/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
export { default as ErrorPage } from "./ErrorPage";
export type { ErrorPageProps } from "./types";
export type {
ErrorPageProps,
ErrorPageWithActionElementProps,
ErrorPageWithoutActionElementProps,
RedirectProps,
ErrorPageBaseProps,
} from "./types";
6 changes: 3 additions & 3 deletions src/components/error-page/types.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { XOR } from "ts-xor";

type ErrorPageBaseProps = {
export type ErrorPageBaseProps = {
errorCode: number;
errorDescription: string;
};

type ErrorPageWithActionElementProps = {
export type ErrorPageWithActionElementProps = {
actionElement?: React.ReactNode;
} & ErrorPageBaseProps;

Expand All @@ -14,6 +14,6 @@ export type RedirectProps = {
redirectTitle: string;
};

type ErrorPageWithoutActionElementProps = RedirectProps & ErrorPageBaseProps;
export type ErrorPageWithoutActionElementProps = RedirectProps & ErrorPageBaseProps;

export type ErrorPageProps = XOR<ErrorPageWithActionElementProps, ErrorPageWithoutActionElementProps>;
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ export * from "./list";
export * from "./drawer";
export * from "./form-control";
export * from "./modal";
export * from "./error-page";

0 comments on commit bdcdc02

Please sign in to comment.