mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 16:51:33 +10:00
Feature: Toggle Page Size between ISO A4 and US Letter
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { css } from '@emotion/css';
|
||||
import { Theme } from '@reactive-resume/schema';
|
||||
import { ThemeConfig } from '@reactive-resume/schema';
|
||||
import clsx from 'clsx';
|
||||
import get from 'lodash/get';
|
||||
import { useMemo } from 'react';
|
||||
@ -17,7 +17,7 @@ const Castform: React.FC<PageProps> = ({ page }) => {
|
||||
const isFirstPage = useMemo(() => page === 0, [page]);
|
||||
|
||||
const layout: string[][] = useAppSelector((state) => state.resume.present.metadata.layout[page]);
|
||||
const theme: Theme = useAppSelector((state) => get(state.resume.present, 'metadata.theme', {}));
|
||||
const theme: ThemeConfig = useAppSelector((state) => get(state.resume.present, 'metadata.theme', {}));
|
||||
|
||||
const contrast = useMemo(() => getContrastColor(theme.primary), [theme.primary]);
|
||||
const color = useMemo(() => (contrast === 'dark' ? theme.text : theme.background), [theme, contrast]);
|
||||
|
||||
Reference in New Issue
Block a user