Skip to content

Commit 105f9df

Browse files
committed
fixed-height modals
1 parent 85f5952 commit 105f9df

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/livecodes/UI/import.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,6 @@ export const createImportUI = ({
271271
showScreen('open');
272272
});
273273

274-
modal.show(importContainer, { isAsync: true, autoFocus: false });
274+
modal.show(importContainer, { isAsync: true, autoFocus: false, size: 'large-fixed' });
275275
getUrlImportInput(importContainer).focus();
276276
};

src/livecodes/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3301,7 +3301,7 @@ const handleNew = () => {
33013301

33023302
loadUserTemplates();
33033303
requestAnimationFrame(() => UI.getStarterTemplatesTab(templatesContainer)?.click());
3304-
modal.show(templatesContainer, { isAsync: true });
3304+
modal.show(templatesContainer, { isAsync: true, size: 'large-fixed' });
33053305
};
33063306

33073307
eventsManager.addEventListener(

src/livecodes/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export type * from '../sdk/models';
22

33
export interface ModalOptions {
4-
size?: 'large' | 'small' | 'full';
4+
size?: 'large' | 'small' | 'full' | 'large-fixed';
55
closeButton?: boolean;
66
isAsync?: boolean;
77
onClose?: () => void;

src/livecodes/styles/inc-modal.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
min-height: 60vh;
6565
}
6666

67+
&.large-fixed {
68+
height: 85vh;
69+
}
70+
6771
#modal-container {
6872
height: 100%;
6973
margin-top: 2rem;

0 commit comments

Comments
 (0)