Skip to content

Commit 07125b8

Browse files
committed
chore: use-react-aria-components
1 parent 9e89cc7 commit 07125b8

File tree

3 files changed

+556
-388
lines changed

3 files changed

+556
-388
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"clsx": "^2.1.1",
7272
"rc-slider": "^9.7.5",
7373
"react": "^18.0.0",
74-
"react-aria": "^3.38.0",
74+
"react-aria-components": "^1.7.1",
7575
"react-dom": "^18.0.0",
7676
"react-is": "^18.0.0",
7777
"simplebar": "^5.3.6",

src/lib/accordion/accordion-item.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Plus from "../../assets/svgs/accordion/plus.svg";
44
import Minus from "../../assets/svgs/accordion/minus.svg";
55

66
import clsx from "clsx";
7+
import { Button } from "react-aria-components";
78

89
interface AccordionItemProps {
910
setExpanded: React.Dispatch<React.SetStateAction<number>>;
@@ -23,14 +24,14 @@ const AccordionItem: React.FC<AccordionItemProps> = ({
2324
const [ref, { height }] = useElementSize();
2425
return (
2526
<div className="mt-2 mb-2">
26-
<button
27+
<Button
2728
className={clsx(
2829
"bg-klerosUIComponentsWhiteBackground border-klerosUIComponentsStroke border",
2930
"hover-medium-blue hover-short-transition hover:cursor-pointer",
3031
"rounded-[3px] pt-[11.5px] pr-8 pb-[11.5px] pl-8",
3132
"flex w-full items-center justify-between",
3233
)}
33-
onClick={() => setExpanded(expanded ? -1 : index)}
34+
onPress={() => setExpanded(expanded ? -1 : index)}
3435
>
3536
{title}
3637
{expanded ? (
@@ -42,7 +43,7 @@ const AccordionItem: React.FC<AccordionItemProps> = ({
4243
className={clsx("fill-klerosUIComponentsPrimaryText h-4 w-4")}
4344
/>
4445
)}
45-
</button>
46+
</Button>
4647
<div
4748
style={{ height: expanded ? `${height.toString()}px` : 0 }}
4849
className={clsx(

0 commit comments

Comments
 (0)