@devopness/ui-react
Version:
Devopness Design System React Components - Painless essential DevOps to everyone
28 lines (27 loc) • 950 B
TypeScript
import { ComponentPropsWithoutRef } from 'react';
import { DetailsContentProps } from './ViewDetailsContent';
/**
* Props for the `ViewDetails` component.
*/
type ViewDetailsProps = {
/** Array of sections, each containing a label and items */
data: {
label: string | undefined;
items: Exclude<DetailsContentProps, 'navigationComponent'>[];
}[];
navigationComponent: DetailsContentProps['navigationComponent'];
};
type DetailsDataProps = ComponentPropsWithoutRef<typeof ViewDetails>['data'][number];
/**
* Component to display multiple sections with details.
*
* @example
* ```tsx
* <ViewDetails data={[
* { label: 'User Info', items: [{ label: 'Name', value: 'John', navigationComponent: NavigationLink }] }
* ]} />
* ```
*/
declare const ViewDetails: ({ data, navigationComponent }: ViewDetailsProps) => import("react/jsx-runtime").JSX.Element;
export { ViewDetails };
export type { DetailsDataProps };