UNPKG

@crossed/ui

Version:

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

50 lines 2.19 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 { Orientation } from '@crossed/primitive'; import { ButtonProps } from './types'; export type ContextButton = { id: string; }; export declare const Provider: (props: ContextButton & { children: React.ReactNode; }) => import("react/jsx-runtime").JSX.Element, useContext: () => ContextButton; export declare const buttonContext: import("react").Context<Pick<ButtonProps, "disabled" | "size" | "variant"> & { state?: { active?: boolean; hover?: boolean; }; textId: string; setTextId: (p: string) => void; }>; type ButtonGroupContext = { orientation: Orientation; grouped?: boolean; }; export declare const ProviderGroup: (props: ButtonGroupContext & { children: React.ReactNode; }) => import("react/jsx-runtime").JSX.Element, useContextGroup: () => ButtonGroupContext; type ItemData = { id: string; }; declare const ButtonGroupCollection: { readonly Provider: React.FC<{ children?: React.ReactNode; }>; readonly Slot: React.ForwardRefExoticComponent<Omit<import("@crossed/primitive").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>; readonly ItemSlot: import("react").ForwardRefExoticComponent<ItemData & { children: React.ReactNode; } & import("react").RefAttributes<HTMLSpanElement>>; }, useButtonGroupCollection: () => () => ({ ref: import("react").RefObject<HTMLSpanElement>; } & ItemData)[]; export declare const ButtonGroupCollectionItemSlot: import("react").ForwardRefExoticComponent<ItemData & { children: React.ReactNode; } & import("react").RefAttributes<HTMLSpanElement>>, ButtonGroupCollectionProvider: import("react").FC<{ children?: React.ReactNode; }>, ButtonGroupCollectionSlot: import("react").ForwardRefExoticComponent<Omit<import("@crossed/primitive").SlotProps & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>; export { ButtonGroupCollection, useButtonGroupCollection }; //# sourceMappingURL=context.d.ts.map