mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-02 02:30:29 +00:00
Add sidebar component
This commit is contained in:
@@ -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;
|
||||
@@ -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;
|
||||
`;
|
||||
Reference in New Issue
Block a user