import React from 'react'; import './FileBrowser.scss'; export interface File { name: string; url: string; size?: number; mimeType?: string; } declare const FileBrowser: React.FC<{ /** * Called with the chosen file's URL. * * Optional: a media-library page opens this browser to MANAGE files, not to * put one anywhere. Without a handler the Insert button is not rendered at * all — a button that cannot do anything is worse than its absence — and the * just-uploaded thumbnails stop being "use this file" targets. */ onInsert?: (url: string) => void; isMultiple: boolean; /** * Optional for the same reason: a page has nothing to close back to, so the * dismiss control is not drawn. */ close?: () => void; /** * The media types this caller can SELECT — exact types or family wildcards * (`['image/*']`). Omit to allow inserting anything. * * Selection only. It does NOT restrict what can be UPLOADED: uploading adds * to the shared media library, and what may go in there is the store's * decision (System Setting -> File Uploads), not the open picker's. A banner * picker asking for images is saying what it can insert, not what the * library may hold. */ accept?: string[]; }>; export { FileBrowser };