Skip to content

Commit 3195af9

Browse files
Fix modal layout (#9980)
Signed-off-by: Artem Savchenko <[email protected]>
1 parent 78c25e8 commit 3195af9

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

packages/theme/styles/components.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,6 @@
642642
border: 1px solid var(--theme-popup-divider); // var(--global-surface-02-BorderColor);
643643
border-radius: var(--large-BorderRadius);
644644
box-shadow: var(--global-modal-ShadowX) var(--global-modal-ShadowY) var(--global-modal-ShadowBlur) var(--global-modal-ShadowSpread) var(--global-popover-ShadowColor);
645-
max-width: 90vw;
646645

647646
&.large {
648647
min-width: unset;

packages/ui/src/components/Modal.svelte

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
2424
export let type: 'type-aside' | 'type-popup' | 'type-component'
2525
export let width: 'large' | 'medium' | 'small' | 'x-small' | 'menu' | undefined = undefined
26+
export let maxWidth: string | undefined = undefined
2627
export let label: IntlString | undefined = undefined
2728
export let labelProps: any | undefined = undefined
2829
export let okAction: () => Promise<void> | void = () => {}
@@ -69,7 +70,12 @@
6970

7071
<svelte:window on:keydown={onKeyDown} />
7172

72-
<div class="hulyModal-container {type} {width ?? ''}" class:hidden class:noTopIndent>
73+
<div
74+
class="hulyModal-container {type} {width ?? ''}"
75+
class:hidden
76+
class:noTopIndent
77+
style={maxWidth ? `max-width: ${maxWidth};` : ''}
78+
>
7379
<Header
7480
{type}
7581
{adaptive}

plugins/card-resources/src/components/CreateCardPopup.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
okLoading={creating}
152152
canSave={data.title != null && data.title.trim().length > 0 && _space != null}
153153
onCancel={handleCancel}
154+
maxWidth="90vw"
154155
on:close
155156
>
156157
<div class="hulyModal-content__titleGroup" style="padding: 0">

0 commit comments

Comments
 (0)