UNPKG

@fluentui/react-northstar

Version:
58 lines (57 loc) 3.1 kB
import { Accessibility, ButtonBehaviorProps } from '@fluentui/accessibility'; import * as PropTypes from 'prop-types'; import * as React from 'react'; import { UIComponentProps, ChildrenComponentProps, ContentComponentProps } from '../../utils'; import { ComponentEventHandler, FluentComponentStaticProps, ShorthandValue } from '../../types'; import { BoxProps } from '../Box/Box'; export interface AlertDismissActionProps extends UIComponentProps, ContentComponentProps<ShorthandValue<BoxProps>>, ChildrenComponentProps { /** Accessibility behavior if overridden by the user. */ accessibility?: Accessibility<ButtonBehaviorProps>; /** A dismiss action can show that it cannot be interacted with. */ disabled?: boolean; /** An alert may be formatted to display a danger message. */ danger?: boolean; /** An alert can be formatted to display a warning message. */ warning?: boolean; /** An alert can be formatted to display a successful message. */ success?: boolean; /** An alert may be formatted to display information. */ info?: boolean; /** * Called after a user clicks the paddle. * @param event - React's original SyntheticEvent. * @param data - All props. */ onClick?: ComponentEventHandler<AlertDismissActionProps>; } export declare type AlertDismissActionSlotClassNames = { content: string; }; export declare type AlertDismissActionStylesProps = Pick<AlertDismissActionProps, 'disabled' | 'danger' | 'warning' | 'info' | 'success'> & { hasContent?: boolean; }; export declare const alertDismissActionClassName = "ui-alert__dismissaction"; export declare const alertDismissActionSlotClassNames: AlertDismissActionSlotClassNames; /** * A AlertDismissAction allows users to customize the dismissAction slot inside the Alert component. * * @accessibility * Implements [ARIA Button](https://www.w3.org/TR/wai-aria-practices-1.1/#button) design pattern. */ export declare const AlertDismissAction: (<TExtendedElementType extends React.ElementType<any> = "button">(props: React.RefAttributes<HTMLButtonElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof AlertDismissActionProps> & { as?: TExtendedElementType; } & AlertDismissActionProps) => JSX.Element) & { propTypes?: React.WeakValidationMap<AlertDismissActionProps> & { as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>; }; contextTypes?: PropTypes.ValidationMap<any>; defaultProps?: Partial<AlertDismissActionProps & { as: "button"; }>; displayName?: string; readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLButtonElement> & Omit<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>> & { ref?: React.Ref<HTMLButtonElement>; }, "as" | keyof AlertDismissActionProps> & { as?: "button"; } & AlertDismissActionProps; } & FluentComponentStaticProps<AlertDismissActionProps>;