feat(branches): add branches.

This commit is contained in:
elforjani13
2022-01-23 23:23:40 +02:00
parent a958c6088a
commit 45d9e2cc15
21 changed files with 648 additions and 10 deletions

View 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;
`;