Skip to content

Commit 21aaecf

Browse files
committed
📱 fix responsive UI modal upload files
1 parent cf40168 commit 21aaecf

File tree

3 files changed

+37
-7
lines changed

3 files changed

+37
-7
lines changed

src/app/shared/modals/upload-files/upload-files.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
<div class="file-icon">
2626
<i class="bx" [ngClass]="getIcon(file)"></i>
2727
</div>
28-
<span class="file-name">{{ file.name }}</span>
28+
<div class="file-name">
29+
<span>{{ file.name }}</span>
30+
</div>
2931
<span class="file-size">{{ file.size | fileSize }}</span>
3032
</div>
3133
<div class="file-actions">

src/app/shared/modals/upload-files/upload-files.component.scss

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
@import 'settings/_colors.scss';
22
@import 'settings/_typography.scss';
3+
@import 'settings/_media.scss';
34

45
.modal-content {
5-
min-width: 600px;
6+
width: 90%;
67
}
78

89
.form-group {
@@ -16,6 +17,8 @@
1617

1718
&::-webkit-scrollbar {
1819
width: 5px;
20+
height: 5px;
21+
border: 1px solid var(--bg-2);
1922
}
2023

2124
&::-webkit-scrollbar-track {
@@ -44,6 +47,11 @@
4447
gap: 1rem;
4548
cursor: default;
4649

50+
@include width-medium {
51+
padding: 0.5rem 0.4rem;
52+
gap: 0.5rem;
53+
}
54+
4755
&:hover {
4856
background-color: var(--bg-2);
4957
}
@@ -54,22 +62,41 @@
5462
gap: 1rem;
5563
flex: 1;
5664

65+
@include width-medium {
66+
gap: 0.5rem;
67+
}
68+
5769
& .file-icon {
5870
@include fs-1;
5971
color: var(--fc-purple);
72+
73+
@include width-medium {
74+
@include fs-2;
75+
}
6076
}
6177

6278
& .file-name {
6379
@include fs-6;
6480
@include fw-500;
6581
color: var(--fc-primary);
66-
flex: 10;
82+
text-overflow: ellipsis;
83+
white-space: nowrap;
84+
overflow: hidden;
85+
86+
@include width-medium {
87+
@include fs-7;
88+
flex: 1;
89+
}
6790
}
6891

6992
& .file-size {
7093
@include fs-6;
71-
flex: 2;
7294
color: var(--fc-secondary);
95+
margin: 0 0 0 auto;
96+
97+
@include width-medium {
98+
@include fs-7;
99+
}
73100
}
74101
}
75102

@@ -103,7 +130,7 @@
103130
color: var(--fc-purple);
104131

105132
&.error {
106-
@include fs-4;
133+
@include fs-5;
107134
color: var(--fc-red);
108135
}
109136
}

src/styles.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,14 @@ input {
328328
}
329329

330330
.modal-content {
331-
min-width: 400px;
332331
display: flex;
333332
flex-direction: column;
334333
border-radius: 1rem;
335-
max-width: 30rem;
334+
max-width: 40rem;
336335
background-color: var(--bg);
337336
padding: 1rem;
338337
gap: 1.2rem;
338+
width: 75%;
339339

340340
& .header {
341341
display: flex;
@@ -377,6 +377,7 @@ input {
377377
display: flex;
378378
justify-content: flex-end;
379379
gap: 1rem;
380+
flex-wrap: wrap;
380381
}
381382
}
382383
}

0 commit comments

Comments
 (0)