import React from 'react'; import PropTypes from 'prop-types'; import Item from './Item'; import { ComponentProps } from '../utils/types'; interface SplitButtonPropsBase { /** * Changes the style of the main button and toggle. * * @deprecatedValue 'default' * The `default` value is deprecated and will be removed in a future major version. */ appearance?: 'default' | 'secondary' | 'primary' | 'destructive' | 'destructiveSecondary'; /** * Must be `SplitButton.Item`. By default the first child becomes the main button. The remaining children become dropdown items. */ children?: React.ReactNode; /** * Prevents main button and dropdown toggle from being clicked. */ disabled?: boolean; /** * A React ref which is set to the DOM element when the component mounts and null when it unmounts. */ elementRef?: React.Ref; /** * Restricts the horizontal size of the button. Set `inline` to `false` to * remove the right margin and stretch the button to the full width of * its container. */ inline?: boolean; /** * A callback for when the main button or toggle is clicked. */ onClick?: React.MouseEventHandler; /** * A React ref which is set to the dropdown toggle when the component mounts and null when it unmounts. */ toggleRef?: React.Ref; } type SplitButtonProps = ComponentProps; declare function SplitButton({ appearance, children, disabled, elementRef, inline, onClick, toggleRef, ...otherProps }: SplitButtonProps): React.JSX.Element; declare namespace SplitButton { var propTypes: { appearance: PropTypes.Requireable; children: PropTypes.Requireable; disabled: PropTypes.Requireable; elementRef: PropTypes.Requireable; onClick: PropTypes.Requireable<(...args: any[]) => any>; inline: PropTypes.Requireable; toggleRef: PropTypes.Requireable; }; var Item: typeof import("./Item").default; } export default SplitButton; export { Item };