@open-tender/ui
Version:
A component library for use with the Open Tender web app
12 lines (11 loc) • 611 B
JavaScript
import { formatDollars } from '@open-tender/utils';
import React from 'react';
import { makeProps } from '../utils';
import Text from './Text';
import View from './View';
const CheckTotalsLine = ({ config, label, amount }) => {
return (React.createElement(View, Object.assign({}, makeProps(config, 'checkTotals__line')),
React.createElement(Text, Object.assign({}, makeProps(config, 'checkTotals__lineLabel'), { text: label })),
React.createElement(Text, Object.assign({}, makeProps(config, 'checkTotals__lineAmount'), { text: formatDollars(amount) }))));
};
export default CheckTotalsLine;