Add sidebar component

This commit is contained in:
Hazem Krimi
2021-04-28 21:26:14 +01:00
parent 9335214939
commit 348f454878
2 changed files with 36 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import { useReactiveVar } from '@apollo/client';
import { roleVar } from '../../graphql/state';
import { IconButton } from '..';
import { Add } from '../../assets';
import { Wrapper } from './styles';
const Sidebar = () => {
const role = useReactiveVar(roleVar);
return (
<Wrapper color={role}>
<IconButton icon={<Add />} color={role} onClick={() => {}} />
</Wrapper>
);
};
export default Sidebar;
+19
View File
@@ -0,0 +1,19 @@
import styled from 'styled-components';
type WrapperProps = {
color?: 'client' | 'productOwner' | 'developer' | 'admin';
};
export const Wrapper = styled.div<WrapperProps>`
position: fixed;
top: 0;
left: 0;
width: 75px;
height: 100%;
background: ${({ theme, color }) =>
color ? theme.colors[color].light : theme.colors.client.light};
display: grid;
justify-content: center;
align-items: flex-end;
padding: 55px 0px;
`;