import React from "react"; import { MarginProps } from "styled-system"; import { IconType } from "../icon"; import { TagProps } from "../../__internal__/utils/helpers/tags"; export interface SplitButtonProps extends React.ButtonHTMLAttributes, MarginProps, TagProps { /** * @deprecated This prop is deprecated and has no effect. It will be removed in a future release. */ align?: "left" | "right"; /** * @deprecated This prop is deprecated and will be removed in a future release. Please use `variantType` instead. * SplitButton variant type. */ buttonType?: "primary" | "secondary"; /** * The variant type of the main and toggle buttons. Takes precedence over the deprecated `buttonType` prop. */ variantType?: "primary" | "secondary"; /** The additional button to display. */ children: React.ReactNode; /** Prop to specify an aria-label for the component */ "aria-label"?: string; /** Gives the button a disabled state. */ disabled?: boolean; /** Defines an Icon position within the button: "before" | "after" */ iconPosition?: "before" | "after"; /** Defines an Icon type within the button */ iconType?: IconType; /** Set the width of the menu. Defaults to the width of the SplitButton. */ menuWidth?: string; /** The size of the buttons. */ size?: "small" | "medium" | "large"; /** * @deprecated This prop is no longer supported on this component. * Second text child, renders under main text, only when size is "large" */ subtext?: string; /** The text to be displayed in the main button. */ text: string; /** * @deprecated This prop is deprecated and will be removed in a future release. * Renders the white variant of the secondary split button */ isWhite?: boolean; /** * @deprecated This prop is deprecated and will be removed in a future release. * Sets rendering position of menu. */ position?: "left" | "right"; } export type SplitButtonHandle = { /** Programmatically focus the main button */ focusMainButton: () => void; /** Programmatically focus the toggle button. */ focusToggleButton: () => void; } | null; export declare const SplitButton: React.ForwardRefExoticComponent>; export default SplitButton;