diff --git a/package-lock.json b/package-lock.json index 94cf481a..1a177a46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "ISC", "dependencies": { "@floating-ui/react": "^0.26.20", + "clsx": "^2.1.1", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -11419,6 +11420,15 @@ "node": ">=0.10.0" } }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", diff --git a/package.json b/package.json index fbc1d9c4..112c6a35 100644 --- a/package.json +++ b/package.json @@ -129,6 +129,7 @@ }, "dependencies": { "@floating-ui/react": "^0.26.20", + "clsx": "^2.1.1", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/src/components/ui/Accordion/fragments/AccordionContent.tsx b/src/components/ui/Accordion/fragments/AccordionContent.tsx index 84c50c15..60c214ce 100644 --- a/src/components/ui/Accordion/fragments/AccordionContent.tsx +++ b/src/components/ui/Accordion/fragments/AccordionContent.tsx @@ -1,6 +1,7 @@ import React, { useContext } from 'react'; import { AccordionContext } from '../contexts/AccordionContext'; import { AccordionItemContext } from '../contexts/AccordionItemContext'; +import { clsx } from 'clsx'; type AccordionContentProps = { children: React.ReactNode; @@ -16,7 +17,7 @@ const AccordionContent: React.FC = ({ children, index, ac return (
= ({ children, className = '' }) => { return ( -
+
{children}
); diff --git a/src/components/ui/Accordion/fragments/AccordionItem.tsx b/src/components/ui/Accordion/fragments/AccordionItem.tsx index 4894ec20..084b2c46 100644 --- a/src/components/ui/Accordion/fragments/AccordionItem.tsx +++ b/src/components/ui/Accordion/fragments/AccordionItem.tsx @@ -1,5 +1,5 @@ import React, { useState, useContext, useId, useEffect, useRef } from 'react'; - +import { clsx } from 'clsx'; import { AccordionContext } from '../contexts/AccordionContext'; import { AccordionItemContext } from '../contexts/AccordionItemContext'; @@ -61,7 +61,7 @@ const AccordionItem: React.FC = ({ children, value, classNam
{ accordionRef }}> -
+
{children}
diff --git a/src/components/ui/Accordion/fragments/AccordionTrigger.tsx b/src/components/ui/Accordion/fragments/AccordionTrigger.tsx index 38f86789..7af88841 100644 --- a/src/components/ui/Accordion/fragments/AccordionTrigger.tsx +++ b/src/components/ui/Accordion/fragments/AccordionTrigger.tsx @@ -1,6 +1,7 @@ import React, { useContext } from 'react'; import { AccordionContext } from '../contexts/AccordionContext'; import { AccordionItemContext } from '../contexts/AccordionItemContext'; +import { clsx } from 'clsx'; type AccordionTriggerProps = { children: React.ReactNode; @@ -31,7 +32,7 @@ const AccordionTrigger: React.FC = ({ children, index, cl