Skip to content

Commit 931514d

Browse files
feat: Add PostCSS configuration, refactor CRM drawer close button to text, and adjust various UI styles and scrolling behaviors.
1 parent c32b83f commit 931514d

File tree

9 files changed

+64
-47
lines changed

9 files changed

+64
-47
lines changed

postcss.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
plugins: {
3+
autoprefixer: {},
4+
...(process.env.NODE_ENV === 'production' && {
5+
cssnano: {
6+
preset: ['default', { discardComments: { removeAll: true } }],
7+
},
8+
}),
9+
},
10+
};

src/app/(crm)/crm/dashboard/layout.module.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
align-items: center;
77
justify-content: flex-start;
88
box-sizing: border-box;
9+
10+
overflow: auto;
11+
scrollbar-width: none;
912
}
1013

1114
.crm {
@@ -19,5 +22,8 @@
1922
justify-content: flex-start;
2023
gap: 10px;
2124
box-sizing: border-box;
25+
26+
overflow: auto;
27+
scrollbar-width: none;
2228
}
2329
}

src/features/CRMDrawerFilterComponent/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ export const CRMDrawerFilterComponent: React.FC<CRMDrawerFilterComponentProps> =
3535
open={crmDraweFilterState.open}
3636
>
3737
<div className={s.drawerContainer}>
38-
<div className={s.drawerControlsContainer}>
39-
<DrawerCloseButton handleCloseDrawer={handleCloseModal} />
40-
</div>
4138
<div className={s.drawerFiltersContainer}>{children}</div>
4239
</div>
40+
<div className={s.drawerControlsContainer}>
41+
<DrawerCloseButton handleCloseDrawer={handleCloseModal} />
42+
</div>
4343
</Drawer>
4444
);
4545
});

src/features/CRMDrawerFilterComponent/style.module.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ $WIDTH: 100%;
99
align-items: center;
1010
justify-content: space-between;
1111
box-sizing: border-box;
12-
padding: 15px 20px;
13-
border: 1px solid rgba(white, 0.1);
12+
padding: 5px 15px 25px;
13+
border-bottom: 1px solid rgba(white, 0.1);
14+
border-right: 1px solid rgba(white, 0.1);
15+
border-left: 1px solid rgba(white, 0.1);
1416
}
1517
&FiltersContainer {
1618
height: 100%;
@@ -23,7 +25,6 @@ $WIDTH: 100%;
2325
padding: 15px;
2426
padding-top: 30px;
2527
color: white;
26-
border-bottom: 1px solid rgba(white, 0.1);
2728
border-right: 1px solid rgba(white, 0.1);
2829
border-left: 1px solid rgba(white, 0.1);
2930

src/features/CRMDrawerFilterComponent/ui/CloseButton/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ export function DrawerCloseButton({
77
handleCloseDrawer,
88
}: DrawerCloseButtonProps) {
99
return (
10-
<button className={s.btnContainer} onClick={handleCloseDrawer}>
11-
<div className={s.btnCross} />
12-
</button>
10+
<div className={s.container}>
11+
<button onClick={handleCloseDrawer} className={s.btn}>
12+
Закрыть
13+
</button>
14+
</div>
1315
);
1416
}
Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,36 @@
1-
.btn {
2-
&Container {
3-
all: unset;
4-
height: auto;
5-
width: auto;
6-
border-radius: 8px;
1+
.container {
2+
width: 150px;
3+
height: 25px;
4+
box-sizing: border-box;
5+
position: relative;
6+
@media (max-width: 400px) {
7+
width: 100%;
8+
}
9+
&Label {
10+
position: absolute;
11+
left: 2px;
12+
top: -25px;
13+
width: fit-content;
14+
height: 30px;
715
display: flex;
8-
flex-direction: row;
16+
flex-direction: column;
917
align-items: center;
10-
justify-content: flex-start;
18+
justify-content: center;
1119
box-sizing: border-box;
12-
padding: 3px;
13-
cursor: pointer;
14-
}
15-
&Cross {
16-
color: white;
17-
width: 15px;
18-
height: 15px;
19-
position: relative;
20-
&::after {
21-
content: '';
22-
position: absolute;
23-
width: 1px;
24-
height: 15px;
25-
top: 0px;
26-
left: 7px;
27-
background-color: white;
28-
transform: rotate(45deg);
29-
}
30-
&::before {
31-
content: '';
32-
position: absolute;
33-
width: 1px;
34-
height: 15px;
35-
top: 0px;
36-
left: 7px;
37-
background-color: white;
38-
transform: rotate(-45deg);
39-
}
20+
font-size: 13px;
4021
}
4122
}
23+
24+
button.btn {
25+
all: unset;
26+
width: 100%;
27+
height: 100%;
28+
border: 1px solid rgba(white, 0.2);
29+
display: flex;
30+
flex-direction: column;
31+
justify-content: center;
32+
align-items: center;
33+
box-sizing: border-box;
34+
cursor: pointer;
35+
color: white;
36+
}

src/shared/ui/Container/style.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.container {
22
width: 100%;
3-
overflow-y: scroll;
3+
overflow-y: auto;
44
border-right: 1px solid rgba(white, 0.1);
55
border-left: 1px solid rgba(white, 0.1);
66
height: calc(100vh - 30px - 20px - 155px - 60px);

src/widgets/CRMDashboard/Table/ui/TableBody/style.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
box-sizing: border-box;
44
padding: 3px;
55
flex: 1;
6-
overflow-y: scroll;
76
position: relative;
7+
88
&Row {
99
all: unset;
1010
width: 100%;

src/widgets/CRMDashboard/Table/ui/TableModal/ui/Preview3DModel/style.module.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
top: calc(190px / 2 - 5px);
1818
right: 185px;
1919
}
20+
@media (max-height: 670px) {
21+
height: 200px;
22+
}
2023
}
2124
&Controls {
2225
height: 40px;

0 commit comments

Comments
 (0)