mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
refactor: payment made details total lines.
This commit is contained in:
@@ -1,8 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import clsx from 'classnames';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { T, TotalLines, TotalLine } from 'components';
|
import {
|
||||||
import PaymentDrawerCls from './PaymentMadeDrawer.module.scss';
|
T,
|
||||||
|
TotalLines,
|
||||||
|
TotalLine,
|
||||||
|
TotalLineBorderStyle,
|
||||||
|
TotalLineTextStyle,
|
||||||
|
} from 'components';
|
||||||
import { usePaymentMadeDetailContext } from './PaymentMadeDetailProvider';
|
import { usePaymentMadeDetailContext } from './PaymentMadeDetailProvider';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -12,19 +17,26 @@ export default function PaymentMadeDetailFooter() {
|
|||||||
const { paymentMade } = usePaymentMadeDetailContext();
|
const { paymentMade } = usePaymentMadeDetailContext();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={clsx(PaymentDrawerCls.detail_panel_footer)}>
|
<PaymentMadeFooterRoot>
|
||||||
<TotalLines>
|
<PaymentMadeTotalLines labelColWidth={'180px'} amountColWidth={'180px'}>
|
||||||
<TotalLine
|
<TotalLine
|
||||||
title={<T id={'payment_made.details.subtotal'} />}
|
title={<T id={'payment_made.details.subtotal'} />}
|
||||||
value={paymentMade.amount}
|
value={paymentMade.amount}
|
||||||
className={clsx(PaymentDrawerCls.total_line_subtotal)}
|
borderStyle={TotalLineBorderStyle.SingleDark}
|
||||||
/>
|
/>
|
||||||
<TotalLine
|
<TotalLine
|
||||||
title={<T id={'payment_made.details.total'} />}
|
title={<T id={'payment_made.details.total'} />}
|
||||||
value={paymentMade.formatted_amount}
|
value={paymentMade.formatted_amount}
|
||||||
className={clsx(PaymentDrawerCls.total_line_total)}
|
borderStyle={TotalLineBorderStyle.DoubleDark}
|
||||||
|
textStyle={TotalLineTextStyle.Bold}
|
||||||
/>
|
/>
|
||||||
</TotalLines>
|
</PaymentMadeTotalLines>
|
||||||
</div>
|
</PaymentMadeFooterRoot>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const PaymentMadeFooterRoot = styled.div``;
|
||||||
|
|
||||||
|
export const PaymentMadeTotalLines = styled(TotalLines)`
|
||||||
|
margin-left: auto;
|
||||||
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user