fileSize.tsx 391 B

12345678910111213141516171819
  1. import {formatBytesBase2} from 'app/utils';
  2. import getDynamicText from 'app/utils/getDynamicText';
  3. type Props = {
  4. className?: string;
  5. bytes: number;
  6. };
  7. function FileSize(props: Props) {
  8. const {className, bytes} = props;
  9. return (
  10. <span className={className}>
  11. {getDynamicText({value: formatBytesBase2(bytes), fixed: 'xx KB'})}
  12. </span>
  13. );
  14. }
  15. export default FileSize;