FormatByte
Used to format bytes to a human-readable format.
3 MB
2.6 MB
2.62 MB
3 MB
2.6 MB
2.62 MB
import { FormatByte } from '@fintech-sandpit/ui/react';
return ( <FormatByte value={2621440} fraction={0} />
<FormatByte value={2621440} fraction={1} />
<FormatByte value={2621440} />);<script setup lang="ts">import { FormatByte } from '@fintech-sandpit/ui/vue';</script>
<template> <FormatByte :value="2621440" :fraction="0" />
<FormatByte :value="2621440" :fraction="1" />
<FormatByte :value="2621440" /></template>| Name | Type | Required | Default | Description |
|---|---|---|---|---|
value | number | Yes | Value to format | |
fraction | number | 2 | Number of fractional digits |