Skip to content

Commit

Permalink
feat: add document icon
Browse files Browse the repository at this point in the history
  • Loading branch information
TinsFox committed Nov 2, 2024
1 parent 7f1f70e commit 479be5a
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,22 @@ export const Icons = {
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
</svg>
),
document: (props: IconProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
{...props}
>
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />
<polyline points="14 2 14 8 20 8" />
<line x1="16" y1="13" x2="8" y2="13" />
<line x1="16" y1="17" x2="8" y2="17" />
<line x1="10" y1="9" x2="8" y2="9" />
</svg>
),
}
66 changes: 66 additions & 0 deletions src/pages/(admin)/charts/components/page-header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { cn } from "@/lib/utils"

function PageHeader({
className,
children,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<section
className={cn(
"flex flex-col items-start gap-2 px-4 py-8 md:py-12 md:pb-8 lg:py-12 lg:pb-10",
className,
)}
{...props}
>
{children}
</section>
)
}

function PageHeaderHeading({
className,
...props
}: React.HTMLAttributes<HTMLHeadingElement>) {
return (
<h1
className={cn(
"text-3xl font-bold leading-tight tracking-tighter md:text-4xl lg:leading-[1.1]",
className,
)}
{...props}
/>
)
}

function PageHeaderDescription({
className,
...props
}: React.HTMLAttributes<HTMLParagraphElement>) {
return (
<p
className={cn(
"max-w-2xl text-balance text-lg font-light text-foreground",
className,
)}
{...props}
/>
)
}

function PageActions({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div
className={cn(
"flex w-full items-center justify-start gap-2 py-2",
className,
)}
{...props}
/>
)
}

export { PageActions, PageHeader, PageHeaderDescription, PageHeaderHeading }

0 comments on commit 479be5a

Please sign in to comment.