chore: reorganize project structure and ensure default queues
This commit is contained in:
parent
854887f499
commit
1cccb852a5
201 changed files with 417 additions and 838 deletions
56
src/components/site-header.tsx
Normal file
56
src/components/site-header.tsx
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
import type { ReactNode } from "react"
|
||||
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { SidebarTrigger } from "@/components/ui/sidebar"
|
||||
|
||||
interface SiteHeaderProps {
|
||||
title: string
|
||||
lead?: string
|
||||
primaryAction?: ReactNode
|
||||
secondaryAction?: ReactNode
|
||||
}
|
||||
|
||||
export function SiteHeader({
|
||||
title,
|
||||
lead,
|
||||
primaryAction,
|
||||
secondaryAction,
|
||||
}: SiteHeaderProps) {
|
||||
return (
|
||||
<header className="flex h-(--header-height) shrink-0 items-center gap-3 border-b bg-background/80 px-6 py-3 backdrop-blur supports-[backdrop-filter]:bg-background/60 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height) lg:px-8">
|
||||
<SidebarTrigger className="-ml-1" />
|
||||
<Separator orientation="vertical" className="mx-3 hidden h-6 sm:block" />
|
||||
<div className="flex flex-1 flex-col gap-1">
|
||||
{lead ? <span className="text-sm text-muted-foreground">{lead}</span> : null}
|
||||
<h1 className="text-lg font-semibold">{title}</h1>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
{secondaryAction}
|
||||
{primaryAction}
|
||||
</div>
|
||||
</header>
|
||||
)
|
||||
}
|
||||
|
||||
SiteHeader.PrimaryButton = function SiteHeaderPrimaryButton({
|
||||
children,
|
||||
...props
|
||||
}: React.ComponentProps<typeof Button>) {
|
||||
return (
|
||||
<Button size="sm" {...props}>
|
||||
{children}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
SiteHeader.SecondaryButton = function SiteHeaderSecondaryButton({
|
||||
children,
|
||||
...props
|
||||
}: React.ComponentProps<typeof Button>) {
|
||||
return (
|
||||
<Button size="sm" variant="outline" {...props}>
|
||||
{children}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue