Skip to content

Commit 437f0c1

Browse files
authored
1 parent 9256109 commit 437f0c1

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

packages/next/src/next-devtools/dev-overlay/components/devtools-panel/devtools-panel.tsx

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export function DevToolsPanel({
7272
onClick={onCloseDevToolsPanel}
7373
/>
7474
<Draggable
75+
data-nextjs-devtools-panel-draggable
7576
padding={INDICATOR_PADDING}
7677
onDragStart={() => {}}
7778
position={state.devToolsPosition}
@@ -160,13 +161,35 @@ export const DEVTOOLS_PANEL_STYLES = css`
160161
margin: auto;
161162
/* TODO: This is for fullscreen mode. */
162163
/* top: 10vh; */
164+
165+
@media (max-width: 575px) {
166+
left: 20px !important;
167+
right: 20px !important;
168+
}
169+
170+
@media (min-width: 576px) {
171+
max-width: 540px;
172+
}
173+
174+
@media (min-width: 768px) {
175+
max-width: 720px;
176+
}
177+
178+
@media (min-width: 992px) {
179+
max-width: 960px;
180+
}
163181
}
164182
165183
[data-nextjs-devtools-panel-overlay-backdrop] {
166184
/* TODO: Blur on fullscreen mode. */
167185
opacity: 0;
168186
}
169187
188+
[data-nextjs-devtools-panel-draggable] {
189+
/* For responsiveness */
190+
width: 100%;
191+
}
192+
170193
[data-nextjs-devtools-panel-dialog] {
171194
-webkit-font-smoothing: antialiased;
172195
display: flex;
@@ -178,12 +201,9 @@ export const DEVTOOLS_PANEL_STYLES = css`
178201
box-shadow: var(--shadow-lg);
179202
position: relative;
180203
overflow-y: auto;
181-
182-
/* TODO: Remove once the content is filled. */
183-
min-width: 800px;
184-
min-height: 500px;
185-
/* This is handled from dialog/styles.ts */
186-
max-width: var(--next-dialog-max-width);
204+
width: 100%;
205+
max-height: 50vh;
206+
min-height: 450px;
187207
}
188208
189209
[data-nextjs-devtools-panel-header] {

packages/next/src/next-devtools/dev-overlay/components/errors/dev-tools-indicator/draggable.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export function Draggable({
1717
position: currentCorner,
1818
setPosition: setCurrentCorner,
1919
onDragStart,
20+
...props
2021
}: {
2122
children: React.ReactElement
2223
position: Corners
@@ -121,7 +122,7 @@ export function Draggable({
121122
}
122123

123124
return (
124-
<div ref={ref} {...drag} style={{ touchAction: 'none' }}>
125+
<div {...props} ref={ref} {...drag} style={{ touchAction: 'none' }}>
125126
{children}
126127
</div>
127128
)

0 commit comments

Comments
 (0)