CIA Compliance Manager API Documentation - v1.0.1
    Preparing search index...

    Interface WidgetPropsWithLoading<T>

    Widget props with loading state

    Generic interface for widgets that load and display data asynchronously.

    interface MyData {
    value: number;
    }

    const props: WidgetPropsWithLoading<MyData> = {
    data: { value: 42 },
    loading: false,
    error: undefined
    };
    interface WidgetPropsWithLoading<T> {
        children?: ReactNode;
        className?: string;
        data: T | null;
        error?: Error;
        loading: boolean;
        onError?: (error: Error) => void;
        testId?: string;
    }

    Type Parameters

    • T

      Type of data being loaded

    Hierarchy (View Summary)

    Index

    Properties

    children?: ReactNode

    Optional children elements

    className?: string

    Optional CSS class name for custom styling

    Allows consumers to apply custom styles via CSS classes. Use Tailwind CSS classes or custom CSS classes.

    "mt-4 border-2 rounded-lg"
    
    data: T | null

    Data to display in widget

    error?: Error

    Error encountered while loading

    loading: boolean

    If true, widget is loading data

    onError?: (error: Error) => void

    Optional callback when widget encounters an error

    Type Declaration

      • (error: Error): void
      • Parameters

        • error: Error

          Error that occurred

        Returns void

    testId?: string

    Optional test ID for automated testing

    Used by testing frameworks (Cypress, Vitest) to locate and interact with the component. Should follow the pattern defined in testIds constants.

    "security-widget-availability"