feat: add Base UI Tailwind component library
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.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
"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"
|
||||
Reference in New Issue
Block a user