- Implemented Tooltip component using Radix UI for better accessibility and customization. - Created TooltipProvider, TooltipTrigger, and TooltipContent for modular usage. - Added useIsMobile hook to detect mobile devices based on screen width. - Updated themes with new color variables for better design consistency across the application.
34 lines
800 B
TypeScript
34 lines
800 B
TypeScript
"use client"
|
|
|
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
|
|
|
|
function Collapsible({
|
|
...props
|
|
}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
|
|
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />
|
|
}
|
|
|
|
function CollapsibleTrigger({
|
|
...props
|
|
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
|
|
return (
|
|
<CollapsiblePrimitive.CollapsibleTrigger
|
|
data-slot="collapsible-trigger"
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function CollapsibleContent({
|
|
...props
|
|
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
|
|
return (
|
|
<CollapsiblePrimitive.CollapsibleContent
|
|
data-slot="collapsible-content"
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export { Collapsible, CollapsibleTrigger, CollapsibleContent }
|