* Fixed right drawer width and shared in theme * Added date packages and tooltip * Added date utils and tests * Added comment thread components * Fixed comment chip * Fix from rebase * Fix from rebase * Fix margin right * Fixed CSS and graphql
34 lines
894 B
TypeScript
34 lines
894 B
TypeScript
import styled from '@emotion/styled';
|
|
import { useRecoilState } from 'recoil';
|
|
|
|
import { isDefined } from '@/utils/type-guards/isDefined';
|
|
|
|
import { Panel } from '../../Panel';
|
|
import { isRightDrawerOpenState } from '../states/isRightDrawerOpenState';
|
|
import { rightDrawerPageState } from '../states/rightDrawerPageState';
|
|
|
|
import { RightDrawerRouter } from './RightDrawerRouter';
|
|
|
|
const StyledRightDrawer = styled.div`
|
|
display: flex;
|
|
flex-direction: row;
|
|
width: ${(props) => props.theme.rightDrawerWidth};
|
|
`;
|
|
|
|
export function RightDrawer() {
|
|
const [isRightDrawerOpen] = useRecoilState(isRightDrawerOpenState);
|
|
const [rightDrawerPage] = useRecoilState(rightDrawerPageState);
|
|
|
|
if (!isRightDrawerOpen || !isDefined(rightDrawerPage)) {
|
|
return <></>;
|
|
}
|
|
|
|
return (
|
|
<StyledRightDrawer>
|
|
<Panel>
|
|
<RightDrawerRouter />
|
|
</Panel>
|
|
</StyledRightDrawer>
|
|
);
|
|
}
|