@ark-ui/react
Version:
A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.
23 lines (22 loc) • 841 B
text/typescript
import { FileMimeType } from '@zag-js/file-utils';
import { MaybePromise } from '../../types';
import { HTMLProps, PolymorphicProps } from '../factory';
import { ForwardRefExoticComponent, RefAttributes } from 'react';
export type DownloadableData = string | Blob | File;
export interface DownloadTriggerBaseProps extends PolymorphicProps {
/**
* The name of the file to download
*/
fileName: string;
/**
* The data to download
*/
data: DownloadableData | (() => MaybePromise<DownloadableData>);
/**
* The MIME type of the data to download
*/
mimeType: FileMimeType;
}
export interface DownloadTriggerProps extends HTMLProps<'button'>, DownloadTriggerBaseProps {
}
export declare const DownloadTrigger: ForwardRefExoticComponent<DownloadTriggerProps & RefAttributes<HTMLButtonElement>>;