@payfit/unity-components
Version:
21 lines (20 loc) • 1.19 kB
TypeScript
import { ButtonProps } from 'react-aria-components/Button';
import { LinkProps } from 'react-aria-components/Link';
/** Raw full-surface action or navigation props. Supply an accessible name. */
export type RawAttachmentTriggerProps = ({
asElement: 'button';
} & Omit<ButtonProps, 'className' | 'style' | 'children'>) | ({
asElement: 'a';
} & Omit<LinkProps, 'className' | 'style' | 'children'>);
/**
* Activates an attachment surface while leaving secondary actions independent.
*
* Choose `asElement="button"` for an action and `asElement="a"` for an href.
* Give the trigger an accessible name with `aria-label` or `aria-labelledby`.
* Use the TanStack Router integration's `AttachmentTrigger` for typed routes.
* The full-surface trigger covers the underlying text, so pointer selection of
* that text is unavailable while a trigger is present.
* @param props - React Aria button or link props and the element choice.
* @see {@link RawAttachmentTriggerProps} for available props.
*/
export declare const RawAttachmentTrigger: import('react').ForwardRefExoticComponent<RawAttachmentTriggerProps & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;