Coral 0.2.17 candidate API
    Preparing search index...

    Interface FileControlsProps

    Props for the FileControls component

    interface FileControlsProps {
        accept?: string;
        className?: string;
        disabled?: boolean;
        document: CoralDocument | null;
        onGetDocument?: () => CoralDocument;
        onLoad: (document: CoralDocument) => void;
        onOpenFile?: (file: { name: string; text: string }) => void;
        onOpenFileError?: (failure: { error: Error; name: string }) => void;
        showExport?: boolean;
        showShortcutHints?: boolean;
        style?: CSSProperties;
    }
    Index
    accept?: string

    File picker accept list; defaults to Coral document JSON.

    className?: string

    Custom class name for the container

    disabled?: boolean

    Disable all controls

    document: CoralDocument | null

    Current document to save

    onGetDocument?: () => CoralDocument

    Callback to get current state as document (for saving)

    onLoad: (document: CoralDocument) => void

    Callback when a document is loaded

    onOpenFile?: (file: { name: string; text: string }) => void

    Receive the chosen file as raw text instead of a parsed document. When given, the caller owns format detection and every open diagnostic.

    onOpenFileError?: (failure: { error: Error; name: string }) => void

    Report a browser read failure to the owner of the raw open pipeline.

    showExport?: boolean

    Show export button

    showShortcutHints?: boolean

    Whether to show keyboard shortcut hints in tooltips

    style?: CSSProperties

    Custom styles for the container