-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4160ea2
commit 6e12db1
Showing
22 changed files
with
403 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,64 @@ | ||
/** @format */ | ||
|
||
import { Button } from "antd"; | ||
|
||
function App() { | ||
return ( | ||
<> | ||
<div className="card"> | ||
<Button type="primary">Primary Button</Button> | ||
</div> | ||
</> | ||
); | ||
import { useState } from "react"; | ||
import { Breadcrumb, Button, Layout, theme } from "antd"; | ||
import { Outlet, useLocation } from "react-router-dom"; | ||
import MenuOutlined from "@ant-design/icons/lib/icons/MenuOutlined"; | ||
import { Sidebar } from "./components/Sidebar/Sidebar"; | ||
|
||
const { Header, Content } = Layout; | ||
|
||
export function App() { | ||
const [showDrawer, setShowDrawer] = useState(false); | ||
const { | ||
token: { colorBgContainer }, | ||
} = theme.useToken(); | ||
|
||
const location = useLocation(); | ||
|
||
return ( | ||
<div className="flex flex-col h-full"> | ||
<Header className="bg-[#43454b] flex pl-0 text-white w-full"> | ||
<Button | ||
type="text" | ||
className="my-auto text-white ml-4" | ||
icon={<MenuOutlined />} | ||
onClick={() => setShowDrawer(!showDrawer)} | ||
/> | ||
|
||
<span className="mx-8 text-lg my-auto font-bold font-mono"> | ||
Ironbench | ||
</span> | ||
</Header> | ||
<div className="flex relative h-full"> | ||
<Sidebar id="test" showDrawer={showDrawer} /> | ||
<Layout className="h-full w-full" style={{ padding: "0 24px 24px" }}> | ||
<Breadcrumb | ||
style={{ margin: "16px 0" }} | ||
items={[ | ||
{ title: "home" }, | ||
...location.pathname | ||
.split("/") | ||
.slice(1) | ||
.map((segment) => { | ||
return { title: segment }; | ||
}), | ||
]} | ||
/> | ||
<Content | ||
className="w-full" | ||
style={{ | ||
padding: 24, | ||
margin: 0, | ||
background: colorBgContainer, | ||
}} | ||
> | ||
<Outlet /> | ||
</Content> | ||
</Layout> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default App; | ||
export default { App }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.