import React, { forwardRef } from "react"; import { Slot } from "../slot/Slot"; interface SlottedDivProps extends React.HTMLAttributes { asChild?: boolean; } const SlottedDivElement = forwardRef( ({ asChild, ...rest }, forwardedRef) => { const Comp = asChild ? Slot : "div"; return ; }, ); type SlottedDivElementRef = React.ElementRef; export { SlottedDivElement, type SlottedDivElementRef, type SlottedDivProps };