UNPKG

@jigoooo/shared-ui

Version:

A reusable React component library and design system with TypeScript support, built on Vite for seamless integration and optimized performance.

12 lines (11 loc) 487 B
/** * Creates a typed useTheme hook with custom colors * @example * // In your app's theme config file * type MyCustomColors = { point1: string; point2: string; }; * export const useTheme = createUseTheme<MyCustomColors>(); * * // In components * const { theme } = useTheme(); // Fully typed with custom colors */ export declare function createUseTheme<TCustomColors extends Record<string, string> = Record<string, never>>(): () => import('..').ThemeContextType<TCustomColors>;