mirror of
https://github.com/navidrome/navidrome.git
synced 2026-03-04 06:35:52 +00:00
18 lines
380 B
JavaScript
18 lines
380 B
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import { formatBytes } from '../utils'
|
|
|
|
export const SizeField = ({ record = {}, source }) => {
|
|
return <span>{formatBytes(record[source])}</span>
|
|
}
|
|
|
|
SizeField.propTypes = {
|
|
label: PropTypes.string,
|
|
record: PropTypes.object,
|
|
source: PropTypes.string.isRequired,
|
|
}
|
|
|
|
SizeField.defaultProps = {
|
|
addLabel: true,
|
|
}
|