@accelint/design-toolkit
Version:
An open-source component library to serve as part of the entire ecosystem of UX for Accelint.
51 lines (48 loc) • 1.52 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import { OptionsDataItem, OptionsProps } from './types.js';
import 'react';
import 'react-aria-components';
import '../icon/types.js';
/**
* Options - A flexible list component for selectable items with rich content
*
* Provides accessible list functionality with support for selection, sections,
* and rich item content including labels, descriptions, and icons. Perfect for
* dropdown lists, menu items, or any selectable list interface.
*
* @example
* // Basic options list
* <Options>
* <OptionsItem>
* <OptionsItemLabel>Option 1</OptionsItemLabel>
* </OptionsItem>
* <OptionsItem>
* <OptionsItemLabel>Option 2</OptionsItemLabel>
* </OptionsItem>
* </Options>
*
* @example
* // Options with descriptions and icons
* <Options>
* <OptionsItem>
* <Icon><User /></Icon>
* <OptionsItemContent>
* <OptionsItemLabel>John Doe</OptionsItemLabel>
* <OptionsItemDescription>Senior Developer</OptionsItemDescription>
* </OptionsItemContent>
* </OptionsItem>
* </Options>
*
* @example
* // Sectioned options
* <Options>
* <OptionsSection header="Recent">
* <OptionsItem>Recent Item 1</OptionsItem>
* </OptionsSection>
* <OptionsSection header="All Items">
* <OptionsItem>All Items 1</OptionsItem>
* </OptionsSection>
* </Options>
*/
declare function Options<T extends OptionsDataItem>({ ref, ...props }: OptionsProps<T>): react_jsx_runtime.JSX.Element;
export { Options };