Uniformize folder structure (#693)

* Uniformize folder structure

* Fix icons

* Fix icons

* Fix tests

* Fix tests
This commit is contained in:
Charles Bochet
2023-07-16 14:29:28 -07:00
committed by GitHub
parent 900ec5572f
commit 6ced8434bd
462 changed files with 931 additions and 960 deletions

View File

@ -0,0 +1,37 @@
import { ReactNode } from 'react';
import styled from '@emotion/styled';
import { TopBarHotkeys } from '../top-bar/components/TableTopBarHotkeys';
import { TOP_BAR_MIN_HEIGHT, TopBar } from '../top-bar/components/TopBar';
import { RightDrawerContainer } from './RightDrawerContainer';
type OwnProps = {
children: JSX.Element | JSX.Element[];
title: string;
icon: ReactNode;
onAddButtonClick?: () => void;
};
const StyledContainer = styled.div`
display: flex;
flex-direction: column;
width: 100%;
`;
export function WithTopBarContainer({
children,
title,
icon,
onAddButtonClick,
}: OwnProps) {
return (
<StyledContainer>
<TopBarHotkeys onAddButtonClick={onAddButtonClick} />
<TopBar title={title} icon={icon} onAddButtonClick={onAddButtonClick} />
<RightDrawerContainer topMargin={TOP_BAR_MIN_HEIGHT + 16 + 16}>
{children}
</RightDrawerContainer>
</StyledContainer>
);
}