mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
35 lines
977 B
JavaScript
35 lines
977 B
JavaScript
import React, { Children } from 'react';
|
|
import moment from 'moment';
|
|
import classnames from 'classnames';
|
|
import LoadingIndicator from 'components/LoadingIndicator';
|
|
|
|
export default function FinancialSheet({
|
|
companyTitle,
|
|
sheetType,
|
|
date,
|
|
children,
|
|
accountingBasis,
|
|
name,
|
|
loading,
|
|
}) {
|
|
const formattedDate = moment(date).format('DD MMMM YYYY')
|
|
const nameModifer = name ? `financial-sheet--${name}` : '';
|
|
|
|
return (
|
|
<div className={classnames('financial-sheet', nameModifer)}>
|
|
<LoadingIndicator loading={loading}>
|
|
<h1 class="financial-sheet__title">{ companyTitle }</h1>
|
|
<h6 class="financial-sheet__sheet-type">{ sheetType }</h6>
|
|
<div class="financial-sheet__date">As of { formattedDate }</div>
|
|
|
|
<div class="financial-sheet__table">
|
|
{ children }
|
|
</div>
|
|
|
|
<div class="financial-sheet__accounting-basis">
|
|
{ accountingBasis }
|
|
</div>
|
|
</LoadingIndicator>
|
|
</div>
|
|
);
|
|
} |