UNPKG

@payfit/unity-components

Version:

68 lines (67 loc) • 2.19 kB
import { ReactNode } from 'react'; import { DropZoneProps as AriaDropZoneProps } from 'react-aria-components/DropZone'; export declare const dropzoneOverlay: import('tailwind-variants').TVReturnType<{ isDropTarget: { true: { content: string; }; false: { content: string; }; }; }, { base: string; target: string; content: string[]; }, undefined, { isDropTarget: { true: { content: string; }; false: { content: string; }; }; }, { base: string; target: string; content: string[]; }, import('tailwind-variants').TVReturnTypeLike<{ isDropTarget: { true: { content: string; }; false: { content: string; }; }; }, { base: string; target: string; content: string[]; }>>; export interface DropzoneOverlayProps extends Omit<AriaDropZoneProps, 'children' | 'style'> { /** Content that remains visible beneath the full-surface drop target. */ children: ReactNode; /** Dropzone parts rendered across the content while it is a drop target. */ overlay: ReactNode; /** override class names */ className?: string; } /** * Reveals a full-surface drop target over an established workspace or surface. * * Use DropzoneOverlay when a page needs to retain its normal content until a * person drags compatible data over it. It places independently-rendered * `children` below a Dropzone that becomes visible only during a drop target * state. * @param props - Dropzone behavior, underlying content, and overlay presentation. * @param props.children - The content that remains visible before and after a drag. * @see {@link DropzoneProps} for the forwarded drop props. * @remarks * DropzoneOverlay keeps `overlay` mounted so `DropzoneLabel` and * `DropzoneDescription` continue to name and describe the target for * assistive technology when the visual layer is transparent. */ declare const DropzoneOverlay: import('react').ForwardRefExoticComponent<DropzoneOverlayProps & import('react').RefAttributes<HTMLDivElement>>; export { DropzoneOverlay };