Skip to content

Commit 4399c79

Browse files
committed
Simplification css des sélecteurs region et département sur la page stats du site
1 parent f9a54e8 commit 4399c79

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

apps/site/app/stats/RegionAndDeptFilters.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ const RegionAndDeptFilters = ({ onChange }: RegionAndDeptFiltersProps) => {
143143
écologique.
144144
</p>
145145
)}
146-
<div className="grid grid-cols-[repeat(auto-fill,minmax(300px,1fr))] gap-x-[50px] gap-y-5 justify-items-start items-end">
147-
<Field title="Région" className="w-full">
146+
<div className="grid sm:grid-cols-2 gap-6 items-end max-w-3xl">
147+
<Field title="Région">
148148
<Select
149149
placeholder="Toutes les régions"
150150
options={regions
@@ -159,7 +159,7 @@ const RegionAndDeptFilters = ({ onChange }: RegionAndDeptFiltersProps) => {
159159
}
160160
/>
161161
</Field>
162-
<Field title="Département" className="w-full">
162+
<Field title="Département">
163163
<Select
164164
placeholder="Tous les départements"
165165
options={departments
@@ -174,21 +174,20 @@ const RegionAndDeptFilters = ({ onChange }: RegionAndDeptFiltersProps) => {
174174
}
175175
/>
176176
</Field>
177-
177+
</div>
178+
{(selectedDepartment || selectedRegion) && (
178179
<Button
179180
variant="outlined"
181+
size="sm"
182+
className="mt-6"
180183
onClick={() => {
181184
setSelectedRegion(emptyString);
182185
setSelectedDepartment(emptyString);
183186
}}
184-
style={{
185-
visibility:
186-
selectedDepartment || selectedRegion ? 'visible' : 'hidden',
187-
}}
188187
>
189188
Désactiver tous les filtres
190189
</Button>
191-
</div>
190+
)}
192191
</>
193192
);
194193
};

0 commit comments

Comments
 (0)