@awsui/components-react
Version:
AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A
34 lines (33 loc) • 969 B
TypeScript
import { IconProps } from '../../../icon';
import { BaseComponentProps } from '../../base-component';
export interface BaseOption {
label?: string;
disabled?: boolean;
}
export interface OptionDefinition extends BaseOption {
value?: string;
labelTag?: string;
description?: string;
iconAlt?: string;
iconName?: IconProps.Name;
iconUrl?: string;
tags?: ReadonlyArray<string>;
filteringTags?: ReadonlyArray<string>;
__labelPrefix?: string;
}
export interface InternalOptionDefinition extends OptionDefinition {
__customIcon?: React.ReactNode;
}
export interface OptionGroup extends BaseOption {
options: ReadonlyArray<OptionDefinition>;
}
export interface DropdownOption {
type?: string;
disabled?: boolean;
option: OptionDefinition | OptionGroup;
}
export interface OptionProps extends BaseComponentProps {
option?: InternalOptionDefinition;
triggerVariant?: boolean;
highlightText?: string;
}