UNPKG

@atlaskit/side-navigation

Version:

A highly composable side navigation component that supports nested views.

36 lines (35 loc) 1.35 kB
/// <reference types="react" /> export interface LoadingItemsProps { /** * Child items that will be loaded asynchronously. */ children: React.ReactNode; /** * Fallback you want to show when loading. * You'll want to use the supplied [skeleton item](/packages/navigation/side-navigation/docs/skeleton-item) * or [skeleton heading item](/packages/navigation/side-navigation/docs/skeleton-heading-item) components. */ fallback: React.ReactNode; /** * Use this to show either the loading fallback or the loaded contents. * It will cross fade between children and fallback when the value is flipped. */ isLoading?: boolean; /** * A `testId` prop is provided for specified elements, * which is a unique string that appears as a data attribute `data-testid` in the rendered code, * serving as a hook for automated tests. * * Will set these elements when defined: * - The entering container - `{testId}--entering` * - The exiting container - `{testId}--exiting` */ testId?: string; } /** * __Loading items__ * * Loading items conditionally render based on the useShouldNestedElementRender() hook. */ declare const LoadingItems: ({ children, isLoading, fallback, testId }: LoadingItemsProps) => JSX.Element; export default LoadingItems;