import { Refable, type Styleable } from "@trackunit/react-components"; export interface WidgetErrorProps extends Refable, Styleable { /** * Custom error message to display. If not provided, a default * localized error message will be shown. */ description?: string; } /** * WidgetError displays a centered error empty state inside a widget. It shows an error illustration * and a message describing what went wrong. If no custom `description` is provided, a default * localized error message is shown. * * ### When to use * Use WidgetError inside a widget when data fetching or processing fails and the widget cannot render its normal content. * * ### When not to use * Do not use WidgetError for page-level errors — use a page-level error boundary or `Notice`. * Do not use it when the widget simply has no data — use `WidgetNoData` instead. * * @example Error state inside a widget * ```tsx * import { WidgetError } from "@trackunit/react-widgets"; * * const MyWidget = ({ error }: { error: boolean }) => { * if (error) return ; * return
Widget content
; * }; * ``` * @param {WidgetErrorProps} props - The props for the WidgetError component * @returns {ReactNode} WidgetError component */ export declare const WidgetError: ({ description, ref, style }: WidgetErrorProps) => import("react").JSX.Element;