Skip to content

Replace with sorting icon #11815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/dashboard/src/images/sort-arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions components/dashboard/src/teams/TeamUsage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { ErrorCodes } from "@gitpod/gitpod-protocol/lib/messaging/error";
import { FeatureFlagContext } from "../contexts/FeatureFlagContext";
import { ReactComponent as CreditsSvg } from "../images/credits.svg";
import { ReactComponent as Spinner } from "../icons/Spinner.svg";
import Arrow from "../components/Arrow";
import { ReactComponent as SortArrow } from "../images/sort-arrow.svg";

function TeamUsage() {
const { teams } = useContext(TeamsContext);
Expand Down Expand Up @@ -202,9 +202,16 @@ function TeamUsage() {
<span>Credits</span>
</ItemField>
<ItemField className="my-auto cursor-pointer">
<span onClick={() => setIsStartedTimeDescending(!isStartedTimeDescending)}>
<span
className="flex my-auto"
onClick={() => setIsStartedTimeDescending(!isStartedTimeDescending)}
>
Started
<Arrow direction={isStartedTimeDescending ? "down" : "up"} />
<SortArrow
className={`h-4 w-4 my-auto ${
isStartedTimeDescending ? "" : " transform rotate-180"
}`}
/>
</span>
</ItemField>
</Item>
Expand Down