Apply CSS to flag icons.

This commit is contained in:
Mike Cao 2023-04-25 21:18:03 -07:00
parent 938047ce45
commit 9345c9ac9e
2 changed files with 13 additions and 11 deletions

View File

@ -13,18 +13,16 @@ export function FilterLink({ id, value, label, externalUrl, children, className
const selected = query[id] === value;
return (
<div className={classNames(styles.row, className)}>
<div
className={classNames(styles.row, className, {
[styles.inactive]: active && !selected,
[styles.active]: active && selected,
})}
>
{children}
{!value && `(${label || formatMessage(labels.unknown)})`}
{value && (
<Link
href={resolveUrl({ [id]: value })}
className={classNames(styles.label, {
[styles.inactive]: active && !selected,
[styles.active]: active && selected,
})}
replace
>
<Link href={resolveUrl({ [id]: value })} className={styles.label} replace>
{safeDecodeURI(label || value)}
</Link>
)}

View File

@ -4,11 +4,15 @@
gap: 10px;
}
.row .inactive {
.row.inactive {
color: var(--base500);
}
.row .active {
.row.inactive img {
opacity: 0.35;
}
.row.active {
color: var(--base900);
font-weight: 600;
}