Skip to content

Commit

Permalink
Use filter styling from container in appeals table and active operati…
Browse files Browse the repository at this point in the history
…on map
  • Loading branch information
frozenhelium committed Dec 6, 2023
1 parent 97b7f41 commit 34ff0c8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 35 deletions.
12 changes: 4 additions & 8 deletions src/components/domain/ActiveOperationMap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ import {
MapLayer,
MapBounds,
} from '@togglecorp/re-map';
import {
ArtboardLineIcon,
CloseLineIcon,
} from '@ifrc-go/icons';
import { ArtboardLineIcon } from '@ifrc-go/icons';

import BaseMap from '#components/domain/BaseMap';
import Button from '#components/Button';
Expand Down Expand Up @@ -355,8 +352,8 @@ function ActiveOperationMap(props: Props) {
className={_cs(styles.activeOperationMap, className)}
heading={!presentationMode && heading}
withHeaderBorder={!presentationMode}
filtersContainerClassName={styles.filters}
childrenContainerClassName={styles.content}
withGridViewInFilter
filters={!presentationMode && (
<>
<DateInput
Expand Down Expand Up @@ -400,12 +397,11 @@ function ActiveOperationMap(props: Props) {
value={rawFilter.displacement}
onChange={setFilterField}
/>
<div className={styles.clearButton}>
<div>
<Button
name={undefined}
icons={<CloseLineIcon />}
onClick={handleClearFiltersButtonclick}
variant="tertiary"
variant="secondary"
disabled={!filtered}
>
{strings.operationMapClearFilters}
Expand Down
11 changes: 0 additions & 11 deletions src/components/domain/ActiveOperationMap/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,6 @@
height: 40rem;
}

.filters {
display: grid;
grid-gap: var(--go-ui-spacing-md);
grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));

.clear-button {
display: flex;
align-items: center;
}
}

.footer {
display: flex;
align-items: flex-end;
Expand Down
8 changes: 3 additions & 5 deletions src/components/domain/AppealsTable/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useMemo, useCallback } from 'react';
import { _cs, isDefined } from '@togglecorp/fujs';
import { CloseLineIcon } from '@ifrc-go/icons';

import Button from '#components/Button';
import Container from '#components/Container';
Expand Down Expand Up @@ -243,8 +242,8 @@ function AppealsTable(props: Props) {
return (
<Container
className={_cs(styles.appealsTable, className)}
filtersContainerClassName={styles.filters}
childrenContainerClassName={styles.content}
withGridViewInFilter
filters={(
<>
<DateInput
Expand Down Expand Up @@ -288,12 +287,11 @@ function AppealsTable(props: Props) {
value={rawFilter.displacement}
onChange={setFilterField}
/>
<div className={styles.clearButton}>
<div>
<Button
name={undefined}
icons={<CloseLineIcon />}
onClick={handleClearFiltersButtonclick}
variant="tertiary"
variant="secondary"
disabled={!filtered}
>
{strings.appealsTableClearFilters}
Expand Down
11 changes: 0 additions & 11 deletions src/components/domain/AppealsTable/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
.appeals-table {
.filters {
display: grid;
grid-gap: var(--go-ui-spacing-md);
grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));

.clear-button {
display: flex;
align-items: center;
}
}

.table {
.start-date {
width: 0%;
Expand Down

0 comments on commit 34ff0c8

Please sign in to comment.