Skip to content

Commit

Permalink
chore: page min height
Browse files Browse the repository at this point in the history
  • Loading branch information
Billie He committed Sep 10, 2024
1 parent 66c8e1f commit 556af14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/entities/activity/ui/items/ActionPlan/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useContext } from 'react';
import { Body } from './Body';
import { DocumentContext } from './DocumentContext';
import { Header } from './Header';
import { usePageWidth, usePageMaxHeight, useXScaledDimension } from './hooks';
import { usePageWidth, usePageMaxHeight, useXScaledDimension, usePageMinHeight } from './hooks';
import { ActivitiesPhrasalData } from './phrasalData';
import { Phrase } from './Phrase';
import { Title } from './Title';
Expand Down Expand Up @@ -34,6 +34,7 @@ export const Page = ({
const { totalPages } = useContext(DocumentContext);
const { t } = useActionPlanTranslation();
const pageWidth = usePageWidth();
const pageMinHeight = usePageMinHeight();
const pageMaxHeight = usePageMaxHeight();
const scaledPadding = useXScaledDimension(16);
const scaledTopPadding = useXScaledDimension(28);
Expand All @@ -58,9 +59,8 @@ export const Page = ({
paddingRight={`${scaledRightPadding}px`}
paddingBottom={`${scaledBottomPadding}px`}
paddingLeft={`${scaledLeftPadding}px`}
// TODO: Implement truncation
minHeight={`${pageMinHeight}px`}
maxHeight={`${pageMaxHeight}px`}
// overflow="hidden"
>
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
4 changes: 4 additions & 0 deletions src/entities/activity/ui/items/ActionPlan/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export const usePageWidth = () => {
return Math.min(windowWidth - PageDimension.padding, PageDimension.maxWidth);
};

export const usePageMinHeight = () => {
return 275;
};

export const usePageMaxHeight = () => {
return 2504;
};
Expand Down

0 comments on commit 556af14

Please sign in to comment.