Nicholai bba1bab8c2 feat(components): initialize custom component library with foundational files
- Added essential configuration files including components.json, package.json, and tsconfig.json to establish the component library structure.
- Introduced global styles in globals.css and layout structure in layout.tsx for consistent design application.
- Implemented various UI components such as Accordion, AlertDialog, Button, Card, and more, enhancing the component library for future development.
- Included utility functions and hooks to support component functionality and responsiveness.

This commit sets up the groundwork for a comprehensive UI component library, facilitating a modular and scalable design system.
2025-11-25 03:01:30 -07:00

30 lines
824 B
TypeScript

import * as React from "react"
import { cn } from "@/lib/utils"
export interface StickySplitProps extends React.HTMLAttributes<HTMLDivElement> {
sidebar: React.ReactNode
sidebarClassName?: string
}
const StickySplit = React.forwardRef<HTMLDivElement, StickySplitProps>(
({ className, sidebar, sidebarClassName, children, ...props }, ref) => {
return (
<div
ref={ref}
className={cn(
"grid gap-[clamp(1.5rem,4vw,4rem)]",
"grid-cols-1 md:grid-cols-[minmax(260px,0.85fr)_minmax(320px,1fr)]",
className,
)}
{...props}
>
<aside className={cn("md:sticky md:top-20 md:self-start", sidebarClassName)}>{sidebar}</aside>
<div>{children}</div>
</div>
)
},
)
StickySplit.displayName = "StickySplit"
export { StickySplit }