Skip to content

Commit

Permalink
Proper color for dropdown caret in light mode + make count + caret cl…
Browse files Browse the repository at this point in the history
…ickable
  • Loading branch information
Marc-Antoine Hinse committed Nov 29, 2024
1 parent 3da3021 commit 2cfc3aa
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 2cfc3aa

Please sign in to comment.