-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(style): update console with new sidebar and topbar design (#425)
Because - We have new topbar and sidebar design This commit - update console with new sidebar and topbar design
- Loading branch information
Showing
27 changed files
with
645 additions
and
667 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,19 +1,22 @@ | ||
import { Sidebar } from "@/components"; | ||
import { ReactNode } from "react"; | ||
import * as React from "react"; | ||
|
||
export type PageBaseProps = { | ||
children: ReactNode; | ||
export const PageBase = ({ children }: { children: React.ReactNode }) => { | ||
return <div className="min-h-screen w-full">{children}</div>; | ||
}; | ||
|
||
export const PageBase = ({ children }: PageBaseProps) => { | ||
const Container = ({ children }: { children: React.ReactNode }) => { | ||
return <div className="flex flex-1">{children}</div>; | ||
}; | ||
|
||
const Content = ({ children }: { children: React.ReactNode }) => { | ||
return ( | ||
<div className="flex min-h-screen flex-col"> | ||
<div className="flex flex-1 flex-row"> | ||
<Sidebar /> | ||
<div className="flex min-h-screen flex-1 flex-col overflow-y-scroll bg-instillGrey05"> | ||
{children} | ||
</div> | ||
<div className="flex flex-1 bg-semantic-bg-base-bg"> | ||
<div className="h-[calc(100vh-var(--topbar-height))] w-full min-w-[927px] overflow-y-scroll p-20"> | ||
{children} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
PageBase.Container = Container; | ||
PageBase.Content = Content; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,89 @@ | ||
import cn from "clsx"; | ||
import Link from "next/link"; | ||
import { useState } from "react"; | ||
import { useRouter } from "next/router"; | ||
import { Icons } from "@instill-ai/design-system"; | ||
import * as Collapsible from "@radix-ui/react-collapsible"; | ||
|
||
export const PipelineCollapsible = () => { | ||
const [isOpen, setIsOpen] = useState(true); | ||
const router = useRouter(); | ||
|
||
return ( | ||
<Collapsible.Root open={isOpen} onOpenChange={setIsOpen} className="w-full"> | ||
<div className="relative"> | ||
<Link | ||
href="/pipelines" | ||
className={cn( | ||
"mb-2 flex flex-row items-center rounded-xs border border-transparent px-3 py-2 hover:bg-semantic-bg-base-bg", | ||
{ | ||
"!border-semantic-accent-default border-opacity-100 bg-semantic-accent-bg": | ||
router.pathname === "/pipelines", | ||
} | ||
)} | ||
> | ||
<div className="flex flex-row items-center space-x-3"> | ||
<Icons.Pipeline className="h-6 w-6 stroke-semantic-fg-primary" /> | ||
<h4 className="text-semantic-fg-primary product-body-text-2-semibold"> | ||
Pipelines | ||
</h4> | ||
</div> | ||
</Link> | ||
<Collapsible.Trigger className="absolute right-3 top-1/2 z-30 ml-auto -translate-y-1/2"> | ||
{isOpen ? ( | ||
<Icons.ChevronUp className="h-6 w-6 stroke-semantic-fg-primary" /> | ||
) : ( | ||
<Icons.ChevronDown className="h-6 w-6 stroke-semantic-fg-primary" /> | ||
)} | ||
</Collapsible.Trigger> | ||
</div> | ||
<Collapsible.Content className="flex flex-col space-y-1"> | ||
<Link | ||
href="/sources" | ||
className={cn( | ||
"flex flex-row items-center space-x-2 rounded-xs border border-transparent py-2 pl-12 pr-3 hover:bg-semantic-bg-base-bg", | ||
{ | ||
"!border-semantic-accent-default border-opacity-100 bg-semantic-accent-bg": | ||
router.pathname === "/sources", | ||
} | ||
)} | ||
> | ||
<Icons.Database01 className="h-6 w-6 stroke-semantic-fg-primary" /> | ||
<p className="stroke-semantic-fg-primary product-body-text-2-semibold"> | ||
Sources | ||
</p> | ||
</Link> | ||
<Link | ||
href="/models" | ||
className={cn( | ||
"flex flex-row items-center space-x-2 rounded-xs border border-transparent py-2 pl-12 pr-3 hover:bg-semantic-bg-base-bg", | ||
{ | ||
"!border-semantic-accent-default border-opacity-100 bg-semantic-accent-bg": | ||
router.pathname === "/models", | ||
} | ||
)} | ||
> | ||
<Icons.Model className="h-6 w-6 stroke-semantic-fg-primary" /> | ||
<p className="stroke-semantic-fg-primary product-body-text-2-semibold"> | ||
Models | ||
</p> | ||
</Link> | ||
<Link | ||
href="/destinations" | ||
className={cn( | ||
"flex flex-row items-center space-x-2 rounded-xs border border-transparent py-2 pl-12 pr-3 hover:bg-semantic-bg-base-bg", | ||
{ | ||
"!border-semantic-accent-default border-opacity-100 bg-semantic-accent-bg": | ||
router.pathname === "/destinations", | ||
} | ||
)} | ||
> | ||
<Icons.Box className="h-6 w-6 stroke-semantic-fg-primary" /> | ||
<p className="stroke-semantic-fg-primary product-body-text-2-semibold"> | ||
Destinations | ||
</p> | ||
</Link> | ||
</Collapsible.Content> | ||
</Collapsible.Root> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.