feat: add new UI components including RadioGroup, Resizable, Sidebar, Spinner, Table, Toast, and ToggleGroup
- Implemented RadioGroup and RadioGroupItem for radio button functionality. - Created ResizablePanelGroup, ResizablePanel, and ResizableHandle for resizable panels. - Developed Sidebar component with context for state management and various subcomponents (SidebarTrigger, SidebarMenu, etc.). - Added Spinner component for loading indicators. - Introduced Table component with TableHeader, TableBody, TableFooter, and related subcomponents for structured data display. - Built Toast component for notifications with customizable actions and icons. - Implemented ToggleGroup and ToggleGroupItem for toggle button functionality with context support.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
function AspectRatio({
|
||||
ratio,
|
||||
className,
|
||||
...props
|
||||
}: React.ComponentProps<"div"> & { ratio: number }) {
|
||||
return (
|
||||
<div
|
||||
data-slot="aspect-ratio"
|
||||
style={
|
||||
{
|
||||
"--ratio": ratio,
|
||||
} as React.CSSProperties
|
||||
}
|
||||
className={cn("relative aspect-(--ratio)", className)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export { AspectRatio }
|
||||
Reference in New Issue
Block a user