@payfit/unity-components
Version:
25 lines (24 loc) • 940 B
TypeScript
import { ReactNode } from 'react';
import { DefinitionListContextValue } from './DefinitionList.context.js';
import * as React from 'react';
export interface DefinitionListProps {
/**
* The layout of the definition list.
* @default 'horizontal'
*/
layout?: DefinitionListContextValue['layout'];
/**
* The content of the definition list, typically DefinitionItem components.
*/
children: ReactNode;
}
/**
* DefinitionList provides a semantic HTML structure for displaying key-value pairs.
* It uses a `<dl>` tag and manages the layout for its `DefinitionItem` children.
* @example
* <DefinitionList layout="horizontal">
* <DefinitionItem term="Last name" description="Doe" />
* <DefinitionItem term="First name" description="John" />
* </DefinitionList>
*/
export declare const DefinitionList: React.ForwardRefExoticComponent<DefinitionListProps & React.RefAttributes<HTMLDListElement>>;