Skip to content

Commit

Permalink
Remove inline styles from the table footer
Browse files Browse the repository at this point in the history
  • Loading branch information
projkov committed Oct 12, 2023
1 parent 2440b43 commit b33a776
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/containers/InvoiceDetails/InvoiceDetails.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import styled from 'styled-components/macro';

export const S = {
InvoiceTableFooterContainer: styled.div`
display: flex;
justify-content: space-between;
font-weight: bold;
`,
};
5 changes: 3 additions & 2 deletions src/containers/InvoiceDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { getFHIRReferenceResourceId } from 'src/utils/reference';

import { InvoiceDetailsHeader } from './components/InvoiceDetailsHeader';
import { useInvoiceDetails, useInvoiceLineItems } from './hooks';
import { S } from './InvoiceDetails.styles';
import { InvoiceDetailsLineItemsProps } from './types';
import { formatMoney } from '../InvoiceList/utils';

Expand Down Expand Up @@ -110,9 +111,9 @@ function LineItemsTable(props: InvoiceDetailsLineItemsProps) {

function InvoiceTableFooter({ totalAmount }: { totalAmount: number }) {
return (
<div style={{ display: 'flex', fontWeight: 'bold', justifyContent: 'space-between' }}>
<S.InvoiceTableFooterContainer>
<div>Total</div>
<div>{formatMoney(totalAmount)}</div>
</div>
</S.InvoiceTableFooterContainer>
);
}

0 comments on commit b33a776

Please sign in to comment.