File tree Expand file tree Collapse file tree 3 files changed +556
-388
lines changed
Expand file tree Collapse file tree 3 files changed +556
-388
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import Plus from "../../assets/svgs/accordion/plus.svg";
44import Minus from "../../assets/svgs/accordion/minus.svg" ;
55
66import clsx from "clsx" ;
7+ import { Button } from "react-aria-components" ;
78
89interface 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 (
You can’t perform that action at this time.
0 commit comments