Skip to content

Commit

Permalink
Merge pull request #71 from Flared/mahinse/fix_blind_mode
Browse files Browse the repository at this point in the history
Proper color for dropdown caret in light mode + make count + caret clickable
  • Loading branch information
TyMarc authored Nov 29, 2024
2 parents 077f4da + 2cfc3aa commit b3bd86d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,35 @@
flex-direction: row;
}

.source-types-category-filler {
flex: 1;
}

.source-types-category-count-container {
display: flex;
flex-direction: row;
cursor: pointer;
}

.source-types-category-count {
width: 1rem;
user-select: none;
color: var(--secondary-text-color);
flex: 1;
text-align: end;
text-align: center;
}

.source-types-category {
width: 1rem;
height: 1rem;
margin-left: 0.5rem;
cursor: pointer;
align-self: center;
}

.source-types-category > span {
display: inline-table;
width: 0.5rem;
height: 0.5rem;
border: solid white;
border: solid var(--text-color);
border-width: 0 0 0.125rem 0.125rem;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,31 @@ const SourceTypeCategoryOption: FC<{
onCheckChange={(checked): void => onCategoryCheckChange(checked)}
/>

<span
hidden={sourceTypeCategory.types.length <= 1}
className="source-types-category-count"
>
{selectedCategoryCount}
</span>
<div
hidden={sourceTypeCategory.types.length <= 1}
className={`source-types-category ${
isExpanded
? 'source-types-category-collapse'
: 'source-types-category-expand'
}`}
className="source-types-category-filler"
/>

<div
className="source-types-category-count-container"
onClick={(): void => setExpanded(!isExpanded)}
>
<span />
<div
hidden={sourceTypeCategory.types.length <= 1}
className="source-types-category-count"
>
{selectedCategoryCount}
</div>
<div
hidden={sourceTypeCategory.types.length <= 1}
className={`source-types-category ${
isExpanded
? 'source-types-category-collapse'
: 'source-types-category-expand'
}`}
>
<span />
</div>
</div>
</div>
<div className="source-types-children-container" hidden={!isExpanded}>
Expand Down

0 comments on commit b3bd86d

Please sign in to comment.