Skip to content

Commit ff691c0

Browse files
committed
feat(creating-an-article): make adaptive 375-1920 in all states
1 parent a0e3d4e commit ff691c0

File tree

9 files changed

+403
-135
lines changed

9 files changed

+403
-135
lines changed

src/components/sidebar/sidebar.module.scss

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,8 @@
4949
text-overflow: ellipsis;
5050
white-space: nowrap;
5151

52-
@media screen and (max-width: calc($media-tablet-small - 1px)) {
53-
font-size: calc-fluid-element(
54-
calc($font-size-text-medium * 10),
55-
calc($font-size-heading-3 * 10),
56-
$media-mobile-small,
57-
$media-tablet-small
58-
);
52+
@media screen and (max-width: $media-tablet-small) {
53+
font-size: $font-size-heading-3;
5954
}
6055
}
6156

Lines changed: 69 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,92 @@
11
@import 'assets/styles/abstracts/variables/colors';
22
@import 'assets/styles/abstracts/variables/fonts';
3+
@import 'assets/styles/abstracts/variables/media-queries';
34
@import 'assets/styles/abstracts/variables/wrappers';
45
@import 'assets/styles/abstracts/placeholders';
6+
@import 'assets/styles/abstracts/functions';
57

68
.content {
7-
display: flex;
8-
flex-direction: column;
9-
row-gap: 54px;
109
max-width: $wrapper-response-desktop;
1110
white-space: pre-wrap;
1211

12+
> *:not(:first-child) {
13+
margin-top: 54px;
14+
15+
@media screen and (max-width: $media-tablet-large) {
16+
margin-top: 32px;
17+
}
18+
19+
@media screen and (max-width: calc($media-tablet-small-extra - 1px)) {
20+
margin-top: 42px;
21+
}
22+
}
23+
1324
button {
14-
max-width: 370px;
25+
min-width: 370px;
26+
27+
@media screen and (max-width: $media-tablet-large) {
28+
min-width: 335px;
29+
}
30+
31+
@media screen and (max-width: calc($media-mobile-small - 1px)) {
32+
min-width: auto;
33+
max-width: 335px;
34+
}
35+
}
36+
}
37+
38+
.contentMessage {
39+
> *:not(:first-child) {
40+
margin-top: 54px;
41+
42+
@media screen and (max-width: $media-tablet-large) {
43+
margin: 0;
44+
}
45+
}
46+
47+
@media screen and (max-width: $media-tablet-large) {
48+
display: flex;
49+
align-items: center;
50+
column-gap: 12px;
1551
}
1652
}
1753

1854
.message {
1955
@extend %text-size-large;
2056
line-height: 151%;
2157
color: $color-neutral-700;
58+
59+
@media screen and (max-width: $media-tablet-large) {
60+
order: 2;
61+
}
62+
63+
@media screen and (max-width: calc($media-tablet-large)) {
64+
font-size: calc-fluid-element(
65+
calc($font-size-text-medium-small * 10),
66+
calc($font-size-text-large * 10),
67+
$media-tablet-small,
68+
$media-tablet-large
69+
);
70+
line-height: $font-line-height-text-medium-small;
71+
letter-spacing: $font-letter-spacing-main;
72+
}
73+
74+
@media screen and (max-width: $media-tablet-small) {
75+
font-size: $font-size-text-medium-small;
76+
}
77+
78+
@media screen and (max-width: calc($media-tablet-small-extra - 1px)) {
79+
max-width: 82.09%;
80+
}
2281
}
2382

2483
.icon {
2584
min-height: 235px;
2685
margin-left: 11%;
86+
87+
@media screen and (max-width: $media-tablet-large) {
88+
width: 48px;
89+
height: 48px;
90+
min-height: auto;
91+
}
2792
}
Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
import { FC, ReactElement, ReactNode } from 'react';
1+
import { FC, ReactNode } from 'react';
2+
import { useWindowDimensions } from 'hooks/useWindowDimensions';
23
import { MailWithIcon } from 'shared/mail-with-icon/mail-with-icon';
4+
import { StatusIcon } from 'shared/icons/status-icon';
5+
import { tabletAlbumOrientation } from 'utils/constants';
36
import styles from './response.module.scss';
47

58
interface IResponseProps {
@@ -8,16 +11,22 @@ interface IResponseProps {
811
button: ReactNode;
912
}
1013

11-
export const Response: FC<IResponseProps> = ({
12-
message,
13-
status,
14-
button,
15-
}): ReactElement => (
16-
<div className={styles.content}>
17-
<p className={styles.message}>{message}</p>
18-
<div className={styles.icon}>
19-
<MailWithIcon hasStatusIcon statusIcon={status} />
14+
export const Response: FC<IResponseProps> = ({ message, status, button }) => {
15+
const isSmallScreenDevice = useWindowDimensions() <= tabletAlbumOrientation;
16+
17+
return (
18+
<div className={styles.content}>
19+
<div className={styles.contentMessage}>
20+
<p className={styles.message}>{message}</p>
21+
<div className={styles.icon}>
22+
{isSmallScreenDevice ? (
23+
<StatusIcon color="white" status={status} />
24+
) : (
25+
<MailWithIcon hasStatusIcon statusIcon={status} />
26+
)}
27+
</div>
28+
</div>
29+
{button}
2030
</div>
21-
{button}
22-
</div>
23-
);
31+
);
32+
};

0 commit comments

Comments
 (0)