Skip to content

Commit

Permalink
Address PR feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaddox5 committed Nov 15, 2024
1 parent 2d1a9ee commit 6655754
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion assets/css/dashboard/filter-group.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.filter-group {
width: 200px;
margin-bottom: 48px;

.header {
font-size: 16px;
Expand Down
4 changes: 3 additions & 1 deletion assets/js/components/Dashboard/FilterGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ interface Props {
filters: Filter[];
selectedFilter: string;
onFilterSelect: (value: string) => void;
className?: string;
}

const FilterGroup = ({
header,
filters,
selectedFilter,
onFilterSelect,
className,
}: Props) => {
return (
<div className="filter-group">
<div className={classNames("filter-group", className)}>
<div className="header">{header}</div>
<ButtonGroup className="button-group" vertical>
{filters.map((filter) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const AssociateAlert = ({ onApply, onCancel }: AssociateAlertPageProps) => {
<Row className="associate-alert-page-body">
<Col className="associate-alert-filter-selection">
<FilterGroup
className="mb-5"
header="Message state"
selectedFilter={selectedMessageState}
onFilterSelect={setSelectedMessageState}
Expand Down
8 changes: 4 additions & 4 deletions assets/js/components/Dashboard/PaMessagesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ const PaMessagesPage: ComponentType = () => {
</Link>
</section>
<FilterGroup
className="mb-5"
header="Filter by message state"
onFilterSelect={(selected) => {
const stateFilter = selected.toLowerCase() as StateFilter;
setStateFilter(stateFilter);
}}
onFilterSelect={(selected) =>
setStateFilter(selected as StateFilter)
}
selectedFilter={stateFilter.toLowerCase()}
filters={[
{ label: "Now", value: "current" },
Expand Down

0 comments on commit 6655754

Please sign in to comment.