@payfit/unity-components
Version:
25 lines (24 loc) • 1.45 kB
TypeScript
import { CircularIconButtonProps } from '../../../../../core/components/icon-button/CircularIconButton.js';
export interface AIComposerActionProps extends Omit<CircularIconButtonProps, 'asElement' | 'className' | 'isLoading' | 'title' | 'style'> {
/** Supplies the tooltip and fallback accessible name for the icon action. */
title?: string;
/** Names the action when its icon alone does not communicate its purpose. */
'aria-label'?: string;
}
declare const getActionTitle: (title: string | undefined, ariaLabel: string | undefined, defaultTitle: string) => string;
/**
* Keeps supporting Composer actions discoverable without competing with the
* primary send or stop action.
*
* Render it in the `left` region of `AIComposerActions` for actions such as
* attaching a file. Pass a specific `aria-label` or `title` for every icon so
* assistive technology can identify its purpose.
* @param props - Icon-button props and the supporting action name.
* @param props.title - Provides the tooltip and fallback accessible name.
* @param props.aria-label - Provides a specific accessible action name.
* @see {@link AIComposerActionProps} for all available props.
* @remarks
* The action inherits `state="disabled"` from the parent Composer.
*/
export declare const AIComposerAction: import('react').ForwardRefExoticComponent<AIComposerActionProps & import('react').RefAttributes<HTMLButtonElement>>;
export { getActionTitle };