@awsui/components-react
Version:
On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en
42 lines • 1.75 kB
TypeScript
/// <reference types="react" />
import { NonCancelableEventHandler } from '../../events';
import { DragHandleProps } from '../drag-handle/interfaces';
export interface SortableAreaProps<Item> {
items: readonly Item[];
itemDefinition: SortableAreaProps.ItemDefinition<Item>;
renderItem: (props: SortableAreaProps.RenderItemProps<Item>) => React.ReactNode;
onItemsChange?: NonCancelableEventHandler<SortableAreaProps.ItemsChangeDetail<Item>>;
i18nStrings?: SortableAreaProps.DndAreaI18nStrings;
disableReorder?: boolean;
}
export declare namespace SortableAreaProps {
interface ItemDefinition<Item> {
id: (item: Item) => string;
label: (item: Item) => string;
borderRadius?: BorderRadiusVariant;
}
type BorderRadiusVariant = 'item' | 'container';
interface RenderItemProps<Item> {
ref?: React.RefCallback<HTMLElement>;
item: Item;
style: React.CSSProperties;
className?: string;
isDropPlaceholder: boolean;
isSortingActive: boolean;
isDragGhost: boolean;
dragHandleProps: DragHandleProps;
}
interface ItemsChangeDetail<Item> {
items: Item[];
movedItem: Item;
}
interface DndAreaI18nStrings {
liveAnnouncementDndStarted?: (position: number, total: number) => string;
liveAnnouncementDndItemReordered?: (initialPosition: number, currentPosition: number, total: number) => string;
liveAnnouncementDndItemCommitted?: (initialPosition: number, finalPosition: number, total: number) => string;
liveAnnouncementDndDiscarded?: string;
dragHandleAriaLabel?: string;
dragHandleAriaDescription?: string;
}
}
//# sourceMappingURL=interfaces.d.ts.map