UNPKG

1.64 kBTypeScriptView Raw
1import * as React from 'react';
2import { BadgeProps } from '../Badge';
3export interface MenuToggleProps extends Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, 'ref'> {
4 /** Content rendered inside the toggle */
5 children?: React.ReactNode;
6 /** Additional classes added to the toggle */
7 className?: string;
8 /** Flag indicating the toggle has expanded styling */
9 isExpanded?: boolean;
10 /** Flag indicating the toggle is disabled */
11 isDisabled?: boolean;
12 /** Flag indicating the toggle is full height */
13 isFullHeight?: boolean;
14 /** Flag indicating the toggle takes up the full width of its parent */
15 isFullWidth?: boolean;
16 /** Variant styles of the menu toggle */
17 variant?: 'default' | 'plain' | 'primary' | 'plainText' | 'secondary';
18 /** Optional icon rendered inside the toggle, before the children content */
19 icon?: React.ReactNode;
20 /** Optional badge rendered inside the toggle, after the children content */
21 badge?: BadgeProps | React.ReactNode;
22 /** Forwarded ref */
23 innerRef?: React.Ref<HTMLButtonElement>;
24}
25export declare class MenuToggleBase extends React.Component<MenuToggleProps> {
26 displayName: string;
27 static defaultProps: {
28 className: string;
29 isExpanded: boolean;
30 isDisabled: boolean;
31 isFullWidth: boolean;
32 isFullHeight: boolean;
33 variant: string;
34 };
35 render(): JSX.Element;
36}
37export declare const MenuToggle: React.ForwardRefExoticComponent<MenuToggleProps & React.RefAttributes<HTMLButtonElement>>;
38//# sourceMappingURL=MenuToggle.d.ts.map
\No newline at end of file