Files
asepharyana-hub-hub/src/components/ui/collapsible.tsx
T
asepharyana 18bf58be1a feat: add UI components for skeleton, slider, sonner, spinner, switch, table, tabs, textarea, toggle group, toggle, tooltip, and mobile hook
- Implemented Skeleton component for loading placeholders.
- Created Slider component with customizable properties.
- Added Sonner component for toast notifications with icons.
- Developed Spinner component for loading indicators.
- Introduced Switch component for toggle functionality.
- Built Table component with header, body, footer, and cell subcomponents.
- Added Tabs component with list, trigger, and content subcomponents.
- Created Textarea component for user input.
- Implemented ToggleGroup and Toggle components for grouped toggle functionality.
- Developed Tooltip component with provider, trigger, and content subcomponents.
- Added useIsMobile hook to detect mobile device viewport.
2026-07-23 11:16:34 +07:00

22 lines
658 B
TypeScript

"use client"
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible"
function Collapsible({ ...props }: CollapsiblePrimitive.Root.Props) {
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />
}
function CollapsibleTrigger({ ...props }: CollapsiblePrimitive.Trigger.Props) {
return (
<CollapsiblePrimitive.Trigger data-slot="collapsible-trigger" {...props} />
)
}
function CollapsibleContent({ ...props }: CollapsiblePrimitive.Panel.Props) {
return (
<CollapsiblePrimitive.Panel data-slot="collapsible-content" {...props} />
)
}
export { Collapsible, CollapsibleTrigger, CollapsibleContent }