Skip to content

Commit d2d2579

Browse files
committed
refactor: layout migration to tailwind
1 parent 3152560 commit d2d2579

File tree

1 file changed

+11
-30
lines changed

1 file changed

+11
-30
lines changed

web/src/layout/index.tsx

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useRef } from "react";
2-
import styled from "styled-components";
32
import "overlayscrollbars/styles/overlayscrollbars.css";
43
import { Outlet } from "react-router-dom";
54
import { ToastContainer } from "react-toastify";
@@ -8,43 +7,25 @@ import { OverlayScrollContext } from "context/OverlayScrollContext";
87
import Header from "./Header";
98
import Footer from "./Footer";
109

11-
const Container = styled.div`
12-
display: flex;
13-
flex-direction: column;
14-
min-height: 100%;
15-
width: 100%;
16-
`;
17-
18-
const StyledOverlayScrollbarsComponent = styled(OverlayScrollbarsComponent)`
19-
height: 100vh;
20-
width: 100vw;
21-
`;
22-
23-
const StyledToastContainer = styled(ToastContainer)`
24-
padding: 16px;
25-
padding-top: 70px;
26-
`;
27-
28-
const OutletContainer = styled.div`
29-
flex: 1;
30-
background-color: ${({ theme }) => theme.lightBackground};
31-
`;
32-
3310
const Layout: React.FC = () => {
3411
const containerRef = useRef(null);
3512

3613
return (
3714
<OverlayScrollContext.Provider value={containerRef}>
38-
<StyledOverlayScrollbarsComponent ref={containerRef} options={{ showNativeOverlaidScrollbars: true }}>
39-
<Container>
15+
<OverlayScrollbarsComponent
16+
className="h-screen w-screen"
17+
ref={containerRef}
18+
options={{ showNativeOverlaidScrollbars: true }}
19+
>
20+
<div className="flex flex-col min-h-full w-full">
4021
<Header />
41-
<StyledToastContainer />
42-
<OutletContainer>
22+
<ToastContainer className="p-4 pt-[70px]" />
23+
<div className="flex-1 bg-klerosUIComponentsLightBackground">
4324
<Outlet />
44-
</OutletContainer>
25+
</div>
4526
<Footer />
46-
</Container>
47-
</StyledOverlayScrollbarsComponent>
27+
</div>
28+
</OverlayScrollbarsComponent>
4829
</OverlayScrollContext.Provider>
4930
);
5031
};

0 commit comments

Comments
 (0)