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.

16 lines (15 loc) 658 B
import { CustomThemeExtensions } from '../model/theme-type.ts'; /** * Creates a typed useTheme hook with custom colors and typography * @example * // In your app's theme config file * type MyCustomTheme = { * colors: { point1: string; point2: string; }; * typography: { fontWeight: { bold: number; } }; * }; * export const useTheme = createUseTheme<MyCustomTheme>(); * * // In components * const { theme } = useTheme(); // Fully typed with custom colors and typography */ export declare function createUseTheme<TCustomTheme extends CustomThemeExtensions = Record<string, never>>(): () => import('../index.ts').ThemeContextType<TCustomTheme>;