UNPKG

@spark-ui/components

Version:

Spark (Leboncoin design system) components.

18 lines (15 loc) 854 B
import * as react_jsx_runtime from 'react/jsx-runtime'; import { PropsWithChildren, HTMLAttributes, Ref, ReactNode } from 'react'; declare const Slottable: ({ children }: { children: React.ReactNode; }) => react_jsx_runtime.JSX.Element; type SlotProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & { ref?: Ref<HTMLElement>; }; declare const Slot: ({ ref, ...props }: SlotProps) => react_jsx_runtime.JSX.Element; /** * When using Radix `Slot` component, it will consider its first child to merge its props with. * In some cases, you might need to wrap the top child with additional markup without breaking this behaviour. */ declare const wrapPolymorphicSlot: (asChild: boolean | undefined, children: ReactNode, callback: (children: ReactNode) => ReactNode) => ReactNode; export { Slot, type SlotProps, Slottable, wrapPolymorphicSlot };