feat: slack community link is updated

This commit is contained in:
Palash gupta 2022-02-12 15:17:40 +05:30
parent bad14a7d09
commit 31f0a9f0b6
No known key found for this signature in database
GPG Key ID: 8FD05AE6F9150AD6
2 changed files with 35 additions and 5 deletions

View File

@ -1,5 +1,10 @@
import { Menu, Typography } from 'antd';
import { MenuItem, SlackButton, ToggleButton } from './styles';
import {
MenuItem,
SlackButton,
SlackMenuItemContainer,
ToggleButton,
} from './styles';
import ROUTES from 'constants/routes';
import history from 'lib/history';
import React, { useCallback, useState } from 'react';
@ -91,9 +96,11 @@ const SideNav = ({ toggleDarkMode }: Props): JSX.Element => {
</Menu.Item>
))}
<MenuItem onClick={onClickSlackHandler} icon={<Slack />}>
<SlackButton>Slack</SlackButton>
</MenuItem>
<SlackMenuItemContainer collapsed={collapsed}>
<MenuItem onClick={onClickSlackHandler} icon={<Slack />}>
<SlackButton>Slack</SlackButton>
</MenuItem>
</SlackMenuItemContainer>
</Menu>
</Sider>
);

View File

@ -1,5 +1,5 @@
import { Layout, Menu, Switch, Typography } from 'antd';
import styled from 'styled-components';
import styled, { css } from 'styled-components';
const { Sider: SiderComponent } = Layout;
export const ThemeSwitcherWrapper = styled.div`
@ -51,3 +51,26 @@ export const MenuItem = styled(Menu.Item)`
background: #262626;
}
`;
export const SlackMenuItemContainer = styled.div<LogoProps>`
&&& {
li {
${({ collapsed }) =>
collapsed &&
css`
padding-left: 24px;
`}
}
svg {
margin-left: ${({ collapsed }) => (collapsed ? '0' : '24px')};
${({ collapsed }) =>
collapsed &&
css`
height: 100%;
margin: 0 auto;
`}
}
}
`;