UNPKG

@stihl-design-system/components

Version:

Welcome to the STIHL Design System react component library.

19 lines (18 loc) 639 B
/** * Formats a file size in bytes into a human-readable string using appropriate units (bytes, kb, mb). * * @param {number} fileSizeInBytes - The size of the file in bytes. * @returns {string} The formatted file size as a string with the appropriate unit (bytes, kb, mb). * * @example * formatFileSize(500); // "500 bytes" * formatFileSize(2048); // "2 kb" * formatFileSize(10485760); // "10 mb" */ export declare const formatFileSize: (fileSizeInBytes: number) => string; export declare const FILE_ICON_EXTENSIONS: { nonDisplayableImages: string[]; documents: string[]; videos: string[]; archives: string[]; };