2022-02-12 15:01:38 +05:30
|
|
|
import { Layout, Menu, Switch, Typography } from 'antd';
|
2022-02-12 15:17:40 +05:30
|
|
|
import styled, { css } from 'styled-components';
|
2022-03-22 12:10:31 +05:30
|
|
|
|
2021-09-28 18:50:10 +05:30
|
|
|
const { Sider: SiderComponent } = Layout;
|
2021-08-27 12:13:32 +05:30
|
|
|
|
|
|
|
|
export const ThemeSwitcherWrapper = styled.div`
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
margin-top: 24px;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const Logo = styled.img<LogoProps>`
|
|
|
|
|
width: 100px;
|
2021-10-22 18:31:53 +05:30
|
|
|
margin: 9% 5% 5% 10%;
|
2021-09-23 15:43:43 +05:30
|
|
|
display: ${({ collapsed }): string => (!collapsed ? 'block' : 'none')};
|
2021-08-27 12:13:32 +05:30
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
interface LogoProps {
|
|
|
|
|
collapsed: boolean;
|
|
|
|
|
}
|
2021-09-28 18:50:10 +05:30
|
|
|
|
|
|
|
|
export const Sider = styled(SiderComponent)`
|
2022-03-03 19:04:23 +05:30
|
|
|
z-index: 999;
|
2021-09-28 18:50:10 +05:30
|
|
|
.ant-typography {
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
2022-02-22 22:52:12 +05:30
|
|
|
.ant-layout-sider-trigger {
|
|
|
|
|
background-color: #1f1f1f;
|
|
|
|
|
}
|
2021-09-28 18:50:10 +05:30
|
|
|
`;
|
2022-01-26 21:55:11 +05:30
|
|
|
|
|
|
|
|
interface DarkModeProps {
|
|
|
|
|
checked?: boolean;
|
|
|
|
|
defaultChecked?: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const ToggleButton = styled(Switch)<DarkModeProps>`
|
|
|
|
|
&&& {
|
|
|
|
|
background: ${({ checked }) => checked === false && 'grey'};
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
2022-02-12 15:01:38 +05:30
|
|
|
export const SlackButton = styled(Typography)`
|
|
|
|
|
&&& {
|
|
|
|
|
margin-left: 1rem;
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
2022-02-12 15:17:40 +05:30
|
|
|
export const SlackMenuItemContainer = styled.div<LogoProps>`
|
2022-03-03 19:04:23 +05:30
|
|
|
position: fixed;
|
|
|
|
|
bottom: 48px;
|
|
|
|
|
background: #262626;
|
|
|
|
|
width: ${({ collapsed }) => (!collapsed ? '200px' : '80px')};
|
|
|
|
|
|
2022-02-12 15:17:40 +05:30
|
|
|
&&& {
|
|
|
|
|
li {
|
|
|
|
|
${({ collapsed }) =>
|
|
|
|
|
collapsed &&
|
|
|
|
|
css`
|
|
|
|
|
padding-left: 24px;
|
|
|
|
|
`}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
svg {
|
|
|
|
|
margin-left: ${({ collapsed }) => (collapsed ? '0' : '24px')};
|
|
|
|
|
|
|
|
|
|
${({ collapsed }) =>
|
|
|
|
|
collapsed &&
|
|
|
|
|
css`
|
|
|
|
|
height: 100%;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
`}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|