UNPKG

@crossed/primitive

Version:

A universal & performant styling library for React Native, Next.js & React

24 lines 1.04 kB
/** * Copyright (c) Paymium. * * This source code is licensed under the MIT license found in the * LICENSE file in the root of this projects source tree. */ import React, { ComponentPropsWithoutRef } from 'react'; import { Slot } from './Slot'; type SlotProps = ComponentPropsWithoutRef<typeof Slot>; type CollectionProps = SlotProps; declare function createCollection<ItemElement extends HTMLElement, ItemData = {}>(name: string): readonly [{ readonly Provider: React.FC<{ children?: React.ReactNode; }>; readonly Slot: React.ForwardRefExoticComponent<Omit<import("./Slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>; readonly ItemSlot: React.ForwardRefExoticComponent<React.PropsWithoutRef<ItemData & { children: React.ReactNode; }> & React.RefAttributes<ItemElement>>; }, () => () => ({ ref: React.RefObject<ItemElement>; } & ItemData)[]]; export { createCollection }; export type { CollectionProps }; //# sourceMappingURL=Collections.d.ts.map