b3a7a2a8f5
Add composable wrappers for 37 Base UI component families. Expose primitive and convenience APIs with shared styling utilities. Add the registry manifest, installer CLI, generation and export checks. Include a smoke example covering primitive and shadcn-style imports.
27 lines
868 B
TypeScript
27 lines
868 B
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import { ContextMenu as BaseContextMenu } from "@base-ui/react/context-menu"
|
|
import { cn } from "@/lib/utils"
|
|
|
|
export type ContextMenuCheckboxItemIndicatorProps = React.ComponentPropsWithoutRef<typeof BaseContextMenu.CheckboxItemIndicator> & {
|
|
className?: string
|
|
}
|
|
|
|
const BaseContextMenuCheckboxItemIndicator = BaseContextMenu.CheckboxItemIndicator as React.ElementType
|
|
|
|
export const ContextMenuCheckboxItemIndicator = React.forwardRef<HTMLElement, ContextMenuCheckboxItemIndicatorProps>(
|
|
({ className, ...props }, ref) => (
|
|
<BaseContextMenuCheckboxItemIndicator
|
|
ref={ref}
|
|
className={cn(
|
|
"flex size-4 shrink-0 items-center justify-center text-current",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
),
|
|
)
|
|
|
|
ContextMenuCheckboxItemIndicator.displayName = "ContextMenuCheckboxItemIndicator"
|