UNPKG

@ehsaneha/react-slot

Version:

A React <Slot> component that merges props and forwards refs to a single child element, similar to Radix UI’s Slot.

6 lines (5 loc) 252 B
import { HTMLAttributes } from "react"; export interface SlotProps extends HTMLAttributes<HTMLElement> { } declare const Slot: import("react").ForwardRefExoticComponent<SlotProps & import("react").RefAttributes<HTMLElement>>; export default Slot;