Files
openchamber/packages/ui/src/contexts/useThemeSystem.ts
T

16 lines
394 B
TypeScript
Raw Normal View History

2025-12-07 19:32:53 +02:00
import { useContext } from 'react';
import { ThemeSystemContext } from './theme-system-context';
export function useThemeSystem() {
const context = useContext(ThemeSystemContext);
if (!context) {
throw new Error('useThemeSystem must be used within a ThemeSystemProvider');
}
return context;
}
export function useOptionalThemeSystem() {
return useContext(ThemeSystemContext);
}