feat: styled preferences page cards.

This commit is contained in:
a.bouhuolia
2021-12-25 19:35:07 +02:00
parent 5defb5a279
commit 6975ebb9e7
6 changed files with 65 additions and 22 deletions

View File

@@ -1,5 +1,8 @@
import React from 'react';
import classNames from 'classnames';
import styled from 'styled-components';
import { Card } from 'components';
import { CLASSES } from 'common/classes';
import { useAccounts, useSaveSettings, useSettings } from 'hooks/query';
import PreferencesPageLoader from '../PreferencesPageLoader';
@@ -35,16 +38,21 @@ function AccountantFormProvider({ ...props }) {
CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT_ACCOUNTANT,
)}
>
<div className={classNames(CLASSES.CARD)}>
<AccountantFormCard>
{isLoading ? (
<PreferencesPageLoader />
) : (
<AccountantFormContext.Provider value={provider} {...props} />
)}
</div>
</AccountantFormCard>
</div>
);
}
const useAccountantFormContext = () => React.useContext(AccountantFormContext);
export { AccountantFormProvider, useAccountantFormContext };
const AccountantFormCard = styled(Card)`
padding: 25px;
`;