UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

32 lines 1.74 kB
import React from 'react'; import { Optional } from '@/utils/types/Optional'; import { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError'; import { PropsWithChildren } from 'react'; import { ErrorBoundaryPropsWithComponent, FallbackProps } from 'react-error-boundary'; type ErrorBannerProps = { error?: string | Error | SynapseClientError | null; reloadButtonFn?: () => void; }; export declare const YOU_ARE_NOT_AUTHORIZED_MESSAGE = "You are not authorized to access this resource."; export declare const SignInPrompt: () => React.ReactNode; export declare const ClientError: (props: { error: SynapseClientError; }) => React.ReactNode; export declare const ErrorBanner: (props: ErrorBannerProps) => React.ReactNode; export declare function ErrorFallbackComponent({ error, resetErrorBoundary, }: FallbackProps): import("react/jsx-runtime").JSX.Element; export declare function TableRowFallbackComponent({ error, resetErrorBoundary, }: FallbackProps): import("react/jsx-runtime").JSX.Element; /** * This error boundary fallback component does not have a UI, it only outputs the error to console.error */ export declare function EmptyFallbackComponent({ error, resetErrorBoundary, }: FallbackProps): import("react/jsx-runtime").JSX.Element; /** * ErrorBoundary component that uses the default error fallback component, unless overridden. * Internally uses `react-error-boundary`. * * Use with {@link react-error-boundary#handleError | handleError} * @param props * @returns */ export declare const SynapseErrorBoundary: (props: PropsWithChildren<Optional<ErrorBoundaryPropsWithComponent, "FallbackComponent">>) => React.ReactNode; export {}; //# sourceMappingURL=ErrorBanner.d.ts.map