@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
49 lines (48 loc) • 1.91 kB
TypeScript
import { BaseComponentProps } from '../internal/base-component';
import { NonCancelableEventHandler } from '../internal/events';
export interface CollectionPreferencesProps<CustomPreferenceType = any> extends BaseComponentProps {
title: string;
confirmLabel: string;
cancelLabel: string;
disabled?: boolean;
pageSizePreference?: CollectionPreferencesProps.PageSizePreference;
wrapLinesPreference?: CollectionPreferencesProps.WrapLinesPreference;
visibleContentPreference?: CollectionPreferencesProps.VisibleContentPreference;
preferences?: CollectionPreferencesProps.Preferences<CustomPreferenceType>;
customPreference?: (customValue: CustomPreferenceType, setCustomValue: React.Dispatch<React.SetStateAction<CustomPreferenceType>>) => React.ReactNode;
onCancel?: NonCancelableEventHandler;
onConfirm?: NonCancelableEventHandler<CollectionPreferencesProps.Preferences<CustomPreferenceType>>;
}
export declare namespace CollectionPreferencesProps {
interface Preferences<CustomPreferenceType = any> {
pageSize?: number;
wrapLines?: boolean;
visibleContent?: ReadonlyArray<string>;
custom?: CustomPreferenceType;
}
interface VisibleContentPreference {
title: string;
options: ReadonlyArray<CollectionPreferencesProps.VisibleContentOptionsGroup>;
}
interface VisibleContentOptionsGroup {
label: string;
options: ReadonlyArray<CollectionPreferencesProps.VisibleContentOption>;
}
interface VisibleContentOption {
id: string;
label: string;
editable?: boolean;
}
interface PageSizePreference {
title: string;
options: ReadonlyArray<PageSizeOption>;
}
interface PageSizeOption {
value: number;
label: string;
}
interface WrapLinesPreference {
label: string;
description: string;
}
}