Skip to content

Commit ddb31e6

Browse files
committed
change box sizing for modal
1 parent 9c23523 commit ddb31e6

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

packages/app/src/app/pages/common/Modals/ShareModal2/elements.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,21 @@ import styled, {
44
} from 'styled-components';
55
import css from '@styled-system/css';
66

7+
// hard coded for desktop, not responsive yet
8+
const SIDEBAR_WIDTH = '272px';
9+
710
export const Container = styled.div(
811
css({
912
display: 'flex',
1013
fontFamily: 'Inter, sans-serif',
1114
// this should ideally be defined by the modal
1215
// not the contents inside it
1316
height: 600,
17+
18+
// we use box-sizing: initial on the body
19+
'*': {
20+
boxSizing: 'border-box',
21+
},
1422
})
1523
);
1624

@@ -20,7 +28,7 @@ export const Sidebar = styled.div(
2028
color: 'white',
2129
fontSize: 3,
2230

23-
width: 272, // hard coded in pixels
31+
width: SIDEBAR_WIDTH,
2432
overflowY: 'auto',
2533
})
2634
);
@@ -221,7 +229,7 @@ export const SwitchLabel = styled.label(
221229
export const Preview = styled.div(
222230
css({
223231
padding: 8,
224-
width: 'calc(100% - 272px - 64px)', // remove sidebar and padding
232+
width: `calc(100% - ${SIDEBAR_WIDTH})`,
225233
background: 'white',
226234
iframe: {
227235
width: '100%',

packages/app/src/app/pages/common/Modals/ShareModal2/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ function ShareModal() {
314314
</ThemeProvider>
315315
</Option>
316316
</Section>
317-
<SectionBody>
317+
<SectionBody style={{ borderBottom: 'none' }}>
318318
<TextArea
319319
code
320320
rows={5}

0 commit comments

Comments
 (0)