Skip to content

Commit 36c3881

Browse files
feat(calendar/dialog): increase height of create dialog
1 parent aff0b61 commit 36c3881

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

components/calendar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export default function Calendar({
339339
)}
340340
{dialog && (
341341
<DialogSurface width={width} offset={offset}>
342-
<DialogContent page={dialogPage}>
342+
<DialogContent page={dialogPage} forceMinHeight={!editing.id}>
343343
<DisplayPage
344344
people={editing.people}
345345
loading={editLoading}

components/dialog/dialog.module.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
position: relative;
55
}
66

7+
.pages.height .page:first-child {
8+
min-height: 100%;
9+
height: 80vh;
10+
max-height: 600px;
11+
}
12+
713
.page {
814
position: absolute;
915
height: 100%;

components/dialog/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import styles from './dialog.module.scss';
66
interface DialogContentProps {
77
page: number;
88
children: JSX.Element[];
9+
forceMinHeight?: boolean;
910
}
1011

1112
/**
@@ -26,6 +27,7 @@ interface DialogContentProps {
2627
export default function DialogContent({
2728
page,
2829
children,
30+
forceMinHeight,
2931
}: DialogContentProps): JSX.Element {
3032
const springs = useSprings(
3133
children.length,
@@ -40,7 +42,7 @@ export default function DialogContent({
4042
);
4143

4244
return (
43-
<div className={styles.pages}>
45+
<div className={cn(styles.pages, { [styles.height]: forceMinHeight })}>
4446
{children.map((child, idx) => (
4547
<animated.div
4648
key={idx}

0 commit comments

Comments
 (0)