@spark-ui/components
Version:
Spark (Leboncoin design system) components.
17 lines (14 loc) • 837 B
text/typescript
import * as react_jsx_runtime from 'react/jsx-runtime';
import { Slot as Slot$1 } from 'radix-ui';
import { PropsWithChildren, HTMLAttributes, Ref, ReactNode } from 'react';
declare const Slottable: typeof Slot$1.Slottable;
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 };