UNPKG

@liveblocks/react-ui

Version:

A set of React pre-built components for the Liveblocks products. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.

37 lines (32 loc) 938 B
"use client"; 'use strict'; var jsxRuntime = require('react/jsx-runtime'); var reactSlot = require('@radix-ui/react-slot'); var react = require('react'); var formatFileSize = require('../utils/format-file-size.cjs'); const FILE_SIZE_NAME = "FileSize"; const FileSize = react.forwardRef( ({ size, locale, children: renderChildren = formatFileSize.formatFileSize, asChild, ...props }, forwardedRef) => { const Component = asChild ? reactSlot.Slot : "span"; const children = react.useMemo( () => typeof renderChildren === "function" ? renderChildren(size, locale) : renderChildren, [renderChildren, size] ); return /* @__PURE__ */ jsxRuntime.jsx(Component, { ...props, ref: forwardedRef, children }); } ); if (process.env.NODE_ENV !== "production") { FileSize.displayName = FILE_SIZE_NAME; } exports.FileSize = FileSize; //# sourceMappingURL=FileSize.cjs.map