@fidely-ui/react
Version:
Fidely UI is a modern, beautifully crafted React design system powered by Ark UI and Panda CSS, delivering accessible and themeable components for building exceptional web apps
29 lines (28 loc) • 1.19 kB
TypeScript
import * as React from 'react';
type GenericProps = Record<string, unknown>;
type RecipeFn = {
(props?: GenericProps): GenericProps;
splitVariantProps: (props: GenericProps) => [GenericProps, GenericProps];
};
type SlotKey<R extends RecipeFn> = keyof ReturnType<R>;
type ForwardOptions = {
forwardProps?: string[];
};
/**
* Fidely UI – Style Context Factory
* Provides a root + slot API for building styled components
* around a recipe definition.
*/
export declare function makeStyleContext<R extends RecipeFn>(recipe: R): {
withSlotRootProvider: <P extends {}>(Component: React.ElementType) => {
(props: P): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
withSlotProvider: <T, P extends {
className?: string | undefined;
}>(Component: React.ElementType, slot: SlotKey<R>, opts?: ForwardOptions) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>>;
withSlotContext: <T, P extends {
className?: string | undefined;
}>(Component: React.ElementType, slot: SlotKey<R>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>>;
};
export {};