Reactive-Resume/client/templates/Onyx/widgets/Heading.tsx

17 lines
451 B
TypeScript
Raw Normal View History

2022-03-02 16:44:11 +00:00
import { Theme } from '@reactive-resume/schema';
import get from 'lodash/get';
import { useAppSelector } from '@/store/hooks';
2022-04-30 10:58:17 +00:00
const Heading: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => {
2022-03-02 16:44:11 +00:00
const theme: Theme = useAppSelector((state) => get(state.resume, 'metadata.theme', {}));
return (
<h4 className="mb-2 font-bold uppercase" style={{ color: theme.primary }}>
{children}
</h4>
);
};
export default Heading;