index.d.mts 925 B

12345678910111213141516171819202122
  1. import React from "react";
  2. import { Slot } from "@radix-ui/react-slot";
  3. import * as Radix from "@radix-ui/react-primitive";
  4. type SlotProps = Radix.ComponentPropsWithoutRef<typeof Slot>;
  5. export interface CollectionProps extends SlotProps {
  6. scope: any;
  7. }
  8. export function createCollection<ItemElement extends HTMLElement, ItemData = {}>(name: string): readonly [{
  9. readonly Provider: React.FC<{
  10. children?: React.ReactNode;
  11. scope: any;
  12. }>;
  13. readonly Slot: React.ForwardRefExoticComponent<CollectionProps & React.RefAttributes<HTMLElement>>;
  14. readonly ItemSlot: React.ForwardRefExoticComponent<React.PropsWithoutRef<ItemData & {
  15. children: React.ReactNode;
  16. scope: any;
  17. }> & React.RefAttributes<ItemElement>>;
  18. }, (scope: any) => () => ({
  19. ref: React.RefObject<ItemElement>;
  20. } & ItemData)[], import("@radix-ui/react-context").CreateScope];
  21. //# sourceMappingURL=index.d.ts.map