Implement new UI

This commit is contained in:
Charles Bochet
2023-04-09 16:43:43 +02:00
parent 58d8d7c090
commit f25f80c199
69 changed files with 473 additions and 1121 deletions

View File

@ -1,24 +1,37 @@
import Navbar from './navbar/Navbar';
import styled from '@emotion/styled';
import { ThemeProvider } from '@emotion/react';
import { User } from '../interfaces/user.interface';
import { Workspace } from '../interfaces/workspace.interface';
import { lightTheme } from './styles/themes';
const StyledLayout = styled.div`
display: flex;
flex-direction: column;
flex-direction: row;
width: 100vw;
height: 100vh;
`;
const StyledRightContainer = styled.div`
display: flex;
flex-direction: row;
flex: 1;
`;
type OwnProps = {
children: JSX.Element;
user?: User;
workspace?: Workspace;
};
function AppLayout({ children, user }: OwnProps) {
function AppLayout({ children, user, workspace }: OwnProps) {
return (
<StyledLayout>
<Navbar user={user} />
<div>{children}</div>
</StyledLayout>
<ThemeProvider theme={lightTheme}>
<StyledLayout>
<Navbar user={user} workspace={workspace} />
<StyledRightContainer>{children}</StyledRightContainer>
</StyledLayout>
</ThemeProvider>
);
}