Files
Reactive-Resume/client/templates/Onyx/widgets/Heading.tsx
2023-06-07 19:50:48 +02:00

17 lines
469 B
TypeScript

import get from 'lodash/get';
import { ThemeConfig } from 'schema';
import { useAppSelector } from '@/store/hooks';
const Heading: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => {
const theme: ThemeConfig = useAppSelector((state) => get(state.resume.present, 'metadata.theme', {} as ThemeConfig));
return (
<h4 className="mb-2 font-bold uppercase" style={{ color: theme.primary }}>
{children}
</h4>
);
};
export default Heading;