Added fontawesome icons

This commit is contained in:
Jay
2025-08-06 14:37:58 -04:00
parent e011bd0763
commit 1683b66025
4 changed files with 106 additions and 13 deletions
@@ -53,6 +53,7 @@
.button {
height: 100%;
width: 100%;
padding: 2px 0px 0px;
cursor: pointer;
user-select: none;
background: none;
+6 -3
View File
@@ -1,6 +1,9 @@
import { useCallback, useEffect, useRef, useState } from "react";
import { useEffect, useRef, useState } from "react";
import type { ChangeEvent, RefObject } from "react";
import { faAngleLeft, faAngleRight } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import clsx from "clsx";
import type { CartesianSpace, Range, Setter, Timeout } from "@/types";
@@ -177,7 +180,7 @@ function Button({
}) {
const isIncrease = direction === "increase";
const label = isIncrease ? "Increase" : "Decrease";
const symbol = isIncrease ? ">" : "<";
const icon = isIncrease ? faAngleRight : faAngleLeft;
const dataCy = `${componentSymbol}-${isIncrease ? "increment" : "decrement"}-button`;
const step = isIncrease ? 1 : -1;
@@ -193,7 +196,7 @@ function Button({
aria-label={`${label} ${componentSymbol}`}
data-cy={dataCy}
>
{symbol}
<FontAwesomeIcon icon={icon} />
</button>
</div>
);