Skip to content

Commit 245d66e

Browse files
Merge pull request #4737 from OneCommunityGlobal/chirag-activity-list-page-clear-button-visibility-fix
Chirag - Fixed the visual of the Clear All button
2 parents 49c4177 + 7ea0941 commit 245d66e

2 files changed

Lines changed: 80 additions & 59 deletions

File tree

src/components/CommunityPortal/Activities/ActivityList.jsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Activity List Component
21
import { useState, useEffect } from 'react';
32
import { useSelector, useStore } from 'react-redux';
43
import styles from './ActivityList.module.css';
@@ -112,10 +111,14 @@ function ActivityList() {
112111
});
113112

114113
return (
115-
<div className={`${styles.activityListContainer} ${darkMode ? 'bg-oxford-blue' : ''}`}>
114+
<div
115+
className={`${styles.activityListContainer} ${
116+
darkMode ? styles.activityListContainerDark : ''
117+
}`}
118+
>
116119
<h1 className={`${styles.heading} ${darkMode ? 'text-light' : ''}`}>Activity List</h1>
117120

118-
<div className={`${styles.filters} ${darkMode ? styles.darkModeFilters : ''}`}>
121+
<div className={`${darkMode ? styles.darkModeFilters : styles.filters}`}>
119122
<label className={darkMode ? 'text-light' : ''}>
120123
Type:
121124
<input
@@ -204,7 +207,9 @@ function ActivityList() {
204207
type="button"
205208
onClick={handleClearFilters}
206209
disabled={!filter.type && !filter.date && !filter.location}
207-
className={styles.clearButton}
210+
className={`${styles.clearFiltersButton} ${
211+
darkMode ? styles.clearFiltersButtonDark : ''
212+
}`}
208213
>
209214
Clear All
210215
</button>

src/components/CommunityPortal/Activities/ActivityList.module.css

Lines changed: 71 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
/* ===== ORIGINAL STYLES (UNCHANGED) ===== */
2-
3-
/* Activity List Container */
41
.activityListContainer {
52
padding: 20px;
63
min-height: calc(100vh - 140px);
74
}
85

9-
/* Dark mode follows Dashboard pattern using bg-oxford-blue */
10-
.activityListContainer:global(.bg-oxford-blue) {
11-
color: #ffffff;
6+
.activityListContainerDark {
7+
color: #fff;
128
padding-bottom: 40px;
139
}
1410

@@ -20,19 +16,6 @@
2016
font-weight: 600;
2117
}
2218

23-
/* Dark mode heading */
24-
.activityListContainer:global(.bg-oxford-blue) .heading {
25-
color: #ffffff !important;
26-
}
27-
28-
/* Body background helper */
29-
:global(.activity-list-dark-body),
30-
:global(.activity-list-dark-body #root),
31-
:global(.activity-list-dark-body .App) {
32-
background-color: #1b2a41 !important;
33-
color: #ffffff !important;
34-
}
35-
3619
.filters {
3720
display: flex;
3821
justify-content: center;
@@ -42,38 +25,47 @@
4225
padding: 10px;
4326
background: #fff;
4427
border-radius: 8px;
45-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
28+
box-shadow: 0 4px 6px rgb(0 0 0 / 10%);
4629
}
4730

4831
.darkModeFilters {
32+
display: flex;
33+
justify-content: center;
34+
align-items: flex-end;
35+
gap: 30px;
36+
margin: 30px 0;
37+
padding: 10px;
4938
background: #1e2a3a;
5039
box-shadow: none;
5140
border: 1px solid #3a4a5c;
5241
border-radius: 0;
5342
}
5443

55-
.filters label {
44+
.filters label,
45+
.darkModeFilters label {
5646
display: flex;
5747
flex-direction: column;
5848
font-weight: 500;
5949
color: #1f2937;
6050
}
6151

6252
.filters input,
63-
.filters select {
53+
.filters select,
54+
.darkModeFilters input,
55+
.darkModeFilters select {
6456
padding: 10px;
6557
border: 1px solid #d1d5db;
6658
border-radius: 6px;
6759
margin-top: 5px;
6860
font-size: 1rem;
6961
transition: all 0.3s ease;
70-
background-color: #ffffff;
62+
background-color: #fff;
7163
color: #333;
7264
}
7365

7466
.darkModeInput {
7567
background-color: #1e2a3a !important;
76-
color: #ffffff !important;
68+
color: #fff !important;
7769
border: 1px solid #3a4a5c !important;
7870
color-scheme: dark;
7971
}
@@ -86,49 +78,29 @@
8678
.filters input:focus {
8779
outline: none;
8880
border-color: #3b82f6;
89-
box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
81+
box-shadow: 0 0 8px rgb(59 130 246 / 30%);
9082
}
9183

9284
.darkModeInput:focus {
9385
border-color: #5c9ce6 !important;
94-
box-shadow: 0 0 8px rgba(92, 156, 230, 0.5) !important;
86+
box-shadow: 0 0 8px rgb(92 156 230 / 50%) !important;
9587
}
9688

9789
.darkModeInput::placeholder {
9890
color: #a0a0a0;
9991
}
10092

101-
/* Clear button */
102-
.clearButton {
103-
padding: 10px 20px;
104-
background-color: #ef4444;
105-
color: #ffffff;
106-
border: none;
107-
border-radius: 6px;
108-
font-size: 1rem;
109-
cursor: pointer;
110-
transition: all 0.3s ease;
111-
}
112-
113-
.clearButton:hover:not(:disabled) {
114-
background-color: #dc2626;
115-
transform: translateY(-2px);
116-
box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
117-
}
118-
119-
.clearButton:disabled {
120-
background-color: #9ca3af;
121-
cursor: not-allowed;
122-
opacity: 0.6;
93+
.darkFilters input[type="date"]::-webkit-calendar-picker-indicator {
94+
filter: invert(1);
12395
}
12496

12597
.activityList {
12698
max-width: 900px;
12799
margin: 0 auto;
128-
background: #ffffff;
100+
background: #fff;
129101
padding: 30px;
130102
border-radius: 12px;
131-
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
103+
box-shadow: 0 6px 12px rgb(0 0 0 / 10%);
132104
}
133105

134106
.darkModeList {
@@ -158,13 +130,13 @@
158130
.darkModeItem {
159131
background-color: #1e2a3a !important;
160132
border: 1px solid #3a4a5c !important;
161-
color: #ffffff !important;
133+
color: #fff !important;
162134
border-radius: 0;
163135
}
164136

165137
.activityList li:hover {
166138
transform: translateY(-3px);
167-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
139+
box-shadow: 0 4px 8px rgb(0 0 0 / 10%);
168140
}
169141

170142
.darkModeItem:hover {
@@ -196,19 +168,63 @@
196168
margin: 20px 0;
197169
}
198170

171+
.clearButtonWrapper{
172+
display: flex;
173+
justify-content: center;
174+
gap: 30px;
175+
padding: 10px;
176+
border-radius: 8px;
177+
}
178+
179+
.clearFiltersButton {
180+
padding: 10px 14px;
181+
border: 1px solid #000;
182+
border-radius: 6px;
183+
background: #f9fafb;
184+
color: #1f2937;
185+
font-family: Poppins, sans-serif;
186+
font-size: 1rem;
187+
font-weight: 500;
188+
cursor: pointer;
189+
transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
190+
}
191+
192+
.clearFiltersButton:disabled {
193+
opacity: 0.5;
194+
cursor: not-allowed;
195+
transform: none;
196+
}
197+
198+
.clearFiltersButton:hover:not(:disabled) {
199+
transform: scale(1.05);
200+
background-color: #f9fafb;
201+
}
202+
203+
204+
.clearFiltersButtonDark {
205+
border: 1px solid #fff;
206+
background: #0f172a;
207+
color: #f1f5f9;
208+
}
209+
210+
.clearFiltersButtonDark:hover:not(:disabled) {
211+
background: #111c33;
212+
}
213+
214+
199215
/* Suggestions */
200216
.suggestions {
201217
position: absolute;
202218
top: 100%;
203219
left: 0;
204220
right: 0;
205-
background: #ffffff;
221+
background: #fff;
206222
border: 1px solid #d1d5db;
207223
border-radius: 6px;
208224
margin-top: 4px;
209225
max-height: 250px;
210226
overflow-y: auto;
211-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
227+
box-shadow: 0 4px 6px rgb(0 0 0 / 10%);
212228
z-index: 1000;
213229
}
214230

@@ -237,7 +253,7 @@
237253
}
238254

239255
/* Responsive */
240-
@media (max-width: 768px) {
256+
@media (width <= 768px) {
241257
.filters {
242258
flex-direction: column;
243259
align-items: center;

0 commit comments

Comments
 (0)