Add chevron to show whether row is expanded

This commit is contained in:
Koen Vlaswinkel
2023-06-19 16:49:47 +02:00
parent 32d8968c56
commit ddd97f08a3

View File

@@ -7,6 +7,7 @@ import { pluralize } from "../../pure/word";
import { ModeledMethodDataGrid } from "./ModeledMethodDataGrid";
import { calculateModeledPercentage } from "./modeled";
import { decimalFormatter, percentFormatter } from "./formatters";
import { Codicon } from "../common";
const LibraryContainer = styled.div`
margin-bottom: 1rem;
@@ -69,6 +70,11 @@ export const LibraryRow = ({
return (
<LibraryContainer>
<TitleContainer onClick={toggleExpanded} aria-expanded={isExpanded}>
{isExpanded ? (
<Codicon name="chevron-down" label="Collapse" />
) : (
<Codicon name="chevron-right" label="Expand" />
)}
{libraryName}
{isExpanded ? null : (
<>