quintodrome/ui/src/common/RangeField.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
416 B
JavaScript
Raw Normal View History

import React from 'react'
import PropTypes from 'prop-types'
import { formatRange } from '../utils'
export const RangeField = ({ className, record = {}, source }) => {
return <span className={className}>{formatRange(record, source)}</span>
}
RangeField.propTypes = {
label: PropTypes.string,
record: PropTypes.object,
source: PropTypes.string.isRequired,
}
RangeField.defaultProps = {
addLabel: true,
}