Skip to content

Commit e10aa4e

Browse files
committed
Responsive design for publish screen
1 parent 64864ff commit e10aa4e

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

src/components/write/PublishActionButtons.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import * as React from 'react';
22
import styled from 'styled-components';
33
import Button from '../common/Button';
4+
import media from '../../lib/styles/media';
45

56
const PublishActionButtonsBlock = styled.div`
67
display: flex;
78
justify-content: flex-end;
9+
${media.custom(767)} {
10+
margin-top: 2rem;
11+
}
812
`;
913

1014
export interface PublishActionButtonsProps {

src/components/write/PublishPrivacySetting.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,16 @@ const Button = styled.button<{ active: boolean }>`
4141
`}
4242
4343
svg {
44-
margin-right: 1.5rem;
4544
}
4645
& + & {
4746
margin-left: 1rem;
4847
}
48+
.description {
49+
flex: 1;
50+
display: flex;
51+
justify-content: center;
52+
align-items: center;
53+
}
4954
`;
5055

5156
export interface PublishPrivacySettingProps {
@@ -69,11 +74,11 @@ const PublishPrivacySetting: React.FC<PublishPrivacySettingProps> = ({
6974
<PublishPrivacySettingBlock title="공개 설정">
7075
<Button active={!isPrivate} onClick={onClickPublic}>
7176
<GlobeIcon />
72-
전체 공개
77+
<div className="description">전체 공개</div>
7378
</Button>
7479
<Button active={isPrivate} onClick={onClickPrivate}>
7580
<LockIcon />
76-
비공개
81+
<div className="description">비공개</div>
7782
</Button>
7883
</PublishPrivacySettingBlock>
7984
);

src/components/write/PublishScreenTemplate.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,29 @@ import palette from '../../lib/styles/palette';
44
import zIndexes from '../../lib/styles/zIndexes';
55
import transitions from '../../lib/styles/transitions';
66
import HideScroll from '../common/HideScroll';
7+
import media from '../../lib/styles/media';
78

89
const PublishScreenTemplateBlock = styled.div<{ visible: boolean }>`
910
display: flex;
1011
justify-content: center;
1112
align-items: center;
1213
position: fixed;
14+
@media (max-width: 1024px) and (orientation: landscape) {
15+
align-items: flex-start;
16+
padding-top: 2rem;
17+
padding-bottom: 2rem;
18+
overflow: auto;
19+
}
20+
21+
${media.custom(767)} {
22+
align-items: flex-start;
23+
padding-top: 2rem;
24+
padding-bottom: 2rem;
25+
overflow: auto;
26+
padding-left: 1rem;
27+
padding-right: 1rem;
28+
}
29+
1330
left: 0;
1431
top: 0;
1532
width: 100%;
@@ -30,6 +47,12 @@ const PublishScreenTemplateBlock = styled.div<{ visible: boolean }>`
3047
const Wrapper = styled.div`
3148
width: 768px;
3249
display: flex;
50+
${media.medium} {
51+
width: 704px;
52+
}
53+
${media.custom(767)} {
54+
flex-direction: column;
55+
}
3356
`;
3457
const Pane = styled.div`
3558
flex: 1;
@@ -46,6 +69,9 @@ const Separator = styled.div`
4669
background: ${palette.gray2};
4770
margin-left: 2rem;
4871
margin-right: 2rem;
72+
${media.custom(767)} {
73+
display: none;
74+
}
4975
`;
5076

5177
export interface PublishScreenTemplateProps {

0 commit comments

Comments
 (0)