Skip to content

Commit

Permalink
fix even more coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnZ9865 committed Oct 31, 2024
1 parent 8e4bc6c commit 6cc9374
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/admin/dashboards/dashboard/dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const Dashboard = ({
<div className="w-full">
<div className="my-2 flex items-center">
<Label className="pr-5 text-2xl font-bold">{title}</Label>

<Filters
statuses={statuses}
filters={filters}
Expand Down
8 changes: 7 additions & 1 deletion src/components/admin/dashboards/dashboard/filters.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
import { COLORS } from "@/data/tags";
import { cn } from "@/utils/tailwind";

const Filters = ({ statuses, filters, setFilters }) => {
const selectedFilters =
Expand Down Expand Up @@ -37,7 +39,11 @@ const Filters = ({ statuses, filters, setFilters }) => {
onClick={() =>
onClick(parseInt(key), selectedFilters.includes(parseInt(key)))
}
className="bg-gray-300"
className={cn(
COLORS[key]?.background,
COLORS[key]?.text,
COLORS[key]?.hover,
)}
>
{value}
</ToggleGroupItem>
Expand Down

0 comments on commit 6cc9374

Please sign in to comment.