UNPKG

@fluentui/react-northstar

Version:
39 lines (38 loc) 2.08 kB
import { Accessibility, ButtonGroupBehaviorProps } from '@fluentui/accessibility'; import * as PropTypes from 'prop-types'; import * as React from 'react'; import { ShorthandCollection, FluentComponentStaticProps } from '../../types'; import { UIComponentProps, ChildrenComponentProps, ContentComponentProps } from '../../utils'; import { ButtonProps } from './Button'; export interface ButtonGroupProps extends UIComponentProps, ChildrenComponentProps, ContentComponentProps { /** * Accessibility behavior if overridden by the user. */ accessibility?: Accessibility<ButtonGroupBehaviorProps>; /** The buttons contained inside the ButtonGroup. */ buttons?: ShorthandCollection<ButtonProps>; /** The buttons inside group can appear circular. */ circular?: boolean; } export declare type ButtonGroupStylesProps = Required<Pick<ButtonGroupProps, 'circular'>>; export declare const buttonGroupClassName = "ui-buttons"; /** * A ButtonGroup represents multiple related actions as a group. */ export declare const ButtonGroup: (<TExtendedElementType extends React.ElementType<any> = "div">(props: React.RefAttributes<HTMLDivElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof ButtonGroupProps> & { as?: TExtendedElementType; } & ButtonGroupProps) => JSX.Element) & { propTypes?: React.WeakValidationMap<ButtonGroupProps> & { as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>; }; contextTypes?: PropTypes.ValidationMap<any>; defaultProps?: Partial<ButtonGroupProps & { as: "div"; }>; displayName?: string; readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLDivElement> & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & { ref?: React.Ref<HTMLDivElement>; }, "as" | keyof ButtonGroupProps> & { as?: "div"; } & ButtonGroupProps; } & FluentComponentStaticProps<ButtonGroupProps>;