filter capitalization

This commit is contained in:
Josh Hawkins 2024-09-18 12:42:49 -05:00
parent 72565d68d3
commit 5e1f2fa6e6

View File

@ -549,15 +549,15 @@ export default function InputWithTags({
filterValues.map((value, index) => ( filterValues.map((value, index) => (
<span <span
key={`${filterType}-${index}`} key={`${filterType}-${index}`}
className="inline-flex items-center whitespace-nowrap rounded-full bg-green-100 px-2 py-0.5 text-sm text-green-800" className="inline-flex items-center whitespace-nowrap rounded-full bg-green-100 px-2 py-0.5 text-sm capitalize text-green-800"
> >
{filterType}:{value} {filterType}: {value.replaceAll("_", " ")}
<button <button
onClick={() => onClick={() =>
removeFilter(filterType as FilterType, value) removeFilter(filterType as FilterType, value)
} }
className="ml-1 focus:outline-none" className="ml-1 focus:outline-none"
aria-label={`Remove ${filterType}:${value} filter`} aria-label={`Remove ${filterType}:${value.replaceAll("_", " ")} filter`}
> >
<LuX className="h-3 w-3" /> <LuX className="h-3 w-3" />
</button> </button>
@ -566,7 +566,7 @@ export default function InputWithTags({
) : ( ) : (
<span <span
key={filterType} key={filterType}
className="inline-flex items-center whitespace-nowrap rounded-full bg-green-100 px-2 py-0.5 text-sm text-green-800" className="inline-flex items-center whitespace-nowrap rounded-full bg-green-100 px-2 py-0.5 text-sm capitalize text-green-800"
> >
{filterType}: {filterType}:
{filterType === "before" || filterType === "after" {filterType === "before" || filterType === "after"