UNPKG

@open-tender/ui

Version:

A component library for use with the Open Tender web app

12 lines (11 loc) 626 B
import { formatDollars } from '@open-tender/utils'; import React from 'react'; import { makeProps } from '../utils'; import Text from './Text'; import View from './View'; const CheckTotalsSubline = ({ config, label, amount }) => { return (React.createElement(View, Object.assign({}, makeProps(config, 'checkTotals__subline')), React.createElement(Text, Object.assign({}, makeProps(config, 'checkTotals__sublineLabel'), { text: label })), React.createElement(Text, Object.assign({}, makeProps(config, 'checkTotals__sublineAmount'), { text: formatDollars(amount) })))); }; export default CheckTotalsSubline;