@wordpress/components
Version:
UI components for WordPress.
30 lines • 952 B
TypeScript
/// <reference types="react" />
import type { DropdownProps } from './types';
/**
* Renders a button that opens a floating content modal when clicked.
*
* ```jsx
* import { Button, Dropdown } from '@wordpress/components';
*
* const MyDropdown = () => (
* <Dropdown
* className="my-container-class-name"
* contentClassName="my-dropdown-content-classname"
* popoverProps={ { placement: 'bottom-start' } }
* renderToggle={ ( { isOpen, onToggle } ) => (
* <Button
* variant="primary"
* onClick={ onToggle }
* aria-expanded={ isOpen }
* >
* Toggle Dropdown!
* </Button>
* ) }
* renderContent={ () => <div>This is the content of the dropdown.</div> }
* />
* );
* ```
*/
export declare const Dropdown: import("react").ForwardRefExoticComponent<DropdownProps & import("react").RefAttributes<any>>;
export default Dropdown;
//# sourceMappingURL=index.d.ts.map