@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
32 lines (31 loc) • 1.2 kB
TypeScript
import { BaseComponentProps } from '../../base-component';
import React from 'react';
import { NonCancelableEventHandler, CancelableEventHandler } from '../../events';
export interface DropdownProps extends BaseComponentProps {
trigger: React.ReactNode;
header?: React.ReactNode;
footer?: React.ReactNode;
children?: React.ReactNode;
open?: boolean;
hideOverflow?: boolean;
onDropdownClose?: NonCancelableEventHandler<null>;
onMouseDown?: CancelableEventHandler<DropdownProps.MouseEventDetail>;
onMouseMove?: CancelableEventHandler<DropdownProps.MouseEventDetail>;
display?: 'block' | 'inline';
dropdownId?: string;
stretchWidth?: boolean;
stretchHeight?: boolean;
prefersDownDirection?: boolean;
interior?: boolean;
nativeAttributes?: Pick<React.HTMLProps<HTMLDivElement>, 'role' | 'aria-expanded' | 'aria-haspopup' | 'aria-owns'>;
}
export declare namespace DropdownProps {
interface Ref {
focus(): void;
}
interface MouseEventDetail {
mouseTarget?: string;
}
}
declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<DropdownProps.Ref>>;
export default Dropdown;