Hiyve Components - v1.0.0
    Preparing search index...

    Interface UpdateButtonProps

    Props for UpdateButton.

    interface UpdateButtonProps {
        checkInterval?: number;
        currentVersion?: string;
        enabled?: boolean;
        labels?: Partial<UpdateButtonLabels>;
        onError?: (error: Error) => void;
        recheckOnFocus?: boolean;
        sx?: SxProps<Theme>;
        variant?: "button" | "icon";
        versionUrl?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    checkInterval?: number

    Polling interval in ms.

    300000 (5 minutes)
    
    currentVersion?: string

    The build hash baked into the running bundle (e.g. via Vite's define injecting an environment variable). When provided, the hook compares the polled version against this value, so a stale tab is detected on the very first poll. When omitted, falls back to anchoring on the first poll's value.

    enabled?: boolean

    Whether to enable polling. Set to false to disable.

    true
    
    labels?: Partial<UpdateButtonLabels>

    Labels override (i18n).

    onError?: (error: Error) => void

    Called on fetch / parse errors.

    recheckOnFocus?: boolean

    Whether to re-check on window focus / visibilitychange (when the tab becomes visible).

    true
    
    sx?: SxProps<Theme>

    MUI sx override.

    variant?: "button" | "icon"

    Visual variant. "icon" is a small IconButton (best for compact toolbars); "button" is a labelled Button.

    "button"
    
    versionUrl?: string

    URL to poll for the server's current version.

    "/version.json"