Files
SnowLuma/.pnpm-store/v11/files/aa/5da321d48185611ff4b3a922aa3a8cb80f750161590474e3a2916fdba2f03acf3200f16ac59488986cfb6e21b13bf7c8821fc3729e6029b4fd4d23ae4aa9d5
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

30 lines
1.2 KiB
Plaintext

import * as React from 'react';
declare module 'react' {
interface ReactElement {
$$typeof?: symbol | string;
}
}
type SlotProps<Elem extends Element = HTMLElement, Props = React.HTMLAttributes<Elem>> = Props & {
children?: React.ReactNode;
};
declare function createSlot<Elem extends Element = HTMLElement, Props = React.HTMLAttributes<Elem>>(ownerName: string): React.ForwardRefExoticComponent<React.PropsWithoutRef<SlotProps<Elem, Props>> & React.RefAttributes<Elem>>;
declare const Slot: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
children?: React.ReactNode;
} & React.RefAttributes<HTMLElement>>;
type SlottableChildrenProps = {
children: React.ReactNode;
};
type SlottableRenderFnProps = {
child: React.ReactNode;
children: (slottable: React.ReactNode) => React.ReactNode;
};
type SlottableProps = SlottableRenderFnProps | SlottableChildrenProps;
interface SlottableComponent extends React.FC<SlottableProps> {
__radixId: symbol;
}
declare function createSlottable(ownerName: string): SlottableComponent;
declare const Slottable: SlottableComponent;
export { Slot as Root, Slot, type SlotProps, Slottable, createSlot, createSlottable };