Skip to content

Commit a449153

Browse files
committed
Enable full-width display for the Modal component and apply it to the Stage Files Modal
1 parent cc95a7d commit a449153

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

‎packages/ui/src/components/editor/panel/modals/Modal/Modal.module.scss‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,8 @@
6868
border: 1px solid var(--vscode-widget-border);
6969
display: flex;
7070
flex-direction: column;
71+
72+
&--full-width {
73+
max-width: none;
74+
}
7175
}

‎packages/ui/src/components/editor/panel/modals/Modal/Modal.tsx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import cn from 'classnames'
12
import { Scrollable } from '../../Scrollable'
23
import styles from './Modal.module.scss'
34

@@ -6,12 +7,17 @@ type Props = {
67
content_slot?: React.ReactNode
78
footer_slot?: React.ReactNode
89
content_max_height?: string
10+
use_full_width?: boolean
911
}
1012

1113
export const Modal: React.FC<Props> = (props) => {
1214
return (
1315
<div className={styles.overlay}>
14-
<div className={styles.container}>
16+
<div
17+
className={cn(styles.container, {
18+
[styles['container--full-width']]: props.use_full_width
19+
})}
20+
>
1521
{props.title && <div className={styles.title}>{props.title}</div>}
1622

1723
{props.content_slot &&

‎packages/ui/src/components/editor/panel/modals/StageFilesModal/StageFilesModal.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export const StageFilesModal: React.FC<Props> = (props) => {
4343
<Modal
4444
title="Select files to commit"
4545
content_max_height="calc(100vh - 150px)"
46+
use_full_width={true}
4647
content_slot={
4748
<div className={styles.files}>
4849
<label

0 commit comments

Comments
 (0)