2025-12-07 19:32:53 +02:00
|
|
|
import React from 'react';
|
|
|
|
|
import { useUIStore } from '@/stores/useUIStore';
|
|
|
|
|
|
|
|
|
|
interface ThemeProviderProps {
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const ThemeProvider: React.FC<ThemeProviderProps> = ({ children }) => {
|
2026-04-04 02:19:55 +03:00
|
|
|
const fontSize = useUIStore((state) => state.fontSize);
|
|
|
|
|
const applyTypography = useUIStore((state) => state.applyTypography);
|
|
|
|
|
const padding = useUIStore((state) => state.padding);
|
|
|
|
|
const applyPadding = useUIStore((state) => state.applyPadding);
|
2025-12-07 19:32:53 +02:00
|
|
|
|
2025-12-16 13:14:28 +02:00
|
|
|
React.useLayoutEffect(() => {
|
2025-12-15 18:11:38 +02:00
|
|
|
applyTypography();
|
|
|
|
|
applyPadding();
|
2026-02-01 18:29:34 +02:00
|
|
|
}, [fontSize, applyTypography, padding, applyPadding]);
|
2025-12-07 19:32:53 +02:00
|
|
|
|
|
|
|
|
return <>{children}</>;
|
2026-02-01 18:29:34 +02:00
|
|
|
};
|