mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat(branches): add branches.
This commit is contained in:
35
src/containers/Preferences/Branches/BranchesProvider.js
Normal file
35
src/containers/Preferences/Branches/BranchesProvider.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import classNames from 'classnames';
|
||||
import { CLASSES } from 'common/classes';
|
||||
import { Card } from 'components';
|
||||
|
||||
const BranchesContext = React.createContext();
|
||||
|
||||
/**
|
||||
* Branches data provider.
|
||||
*/
|
||||
function BranchesProvider({ ...props }) {
|
||||
// Provider state.
|
||||
const provider = {};
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(
|
||||
CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT,
|
||||
CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT_BRANCHES,
|
||||
)}
|
||||
>
|
||||
<BrachesPreferencesCard>
|
||||
<BranchesContext.Provider value={provider} {...props} />
|
||||
</BrachesPreferencesCard>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const useBranchesContext = () => React.useContext(BranchesContext);
|
||||
export { BranchesProvider, useBranchesContext };
|
||||
|
||||
const BrachesPreferencesCard = styled(Card)`
|
||||
padding: 0;
|
||||
`;
|
||||
Reference in New Issue
Block a user