diff --git a/libs/ui-toolkit/src/components/accordion/accordion.tsx b/libs/ui-toolkit/src/components/accordion/accordion.tsx index 01cb45d64..0f4a101e2 100644 --- a/libs/ui-toolkit/src/components/accordion/accordion.tsx +++ b/libs/ui-toolkit/src/components/accordion/accordion.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import * as AccordionPrimitive from '@radix-ui/react-accordion'; -import ChevronDownIcon from './chevron-down'; import classNames from 'classnames'; +import { ChevronDownIcon } from '@radix-ui/react-icons'; export interface AccordionItemProps { title: React.ReactNode; @@ -13,21 +13,20 @@ export interface AccordionProps { } export const Accordion = ({ panels }: AccordionProps) => { - const [value, setValue] = useState(''); + const [values, setValues] = useState([]); const triggerClassNames = classNames( 'w-full py-2 box-border', 'appearance-none cursor-pointer focus:outline-none', 'flex items-center justify-between border-b border-muted', - 'text-left' + 'text-left text-black dark:text-white' ); return ( {panels.map(({ title, content }, i) => ( @@ -37,12 +36,15 @@ export const Accordion = ({ panels }: AccordionProps) => { className={triggerClassNames} >

{title}

- + {
); }; + +export const AccordionChevron = ({ active }: { active: boolean }) => { + return ( + + ); +}; diff --git a/libs/ui-toolkit/src/components/accordion/chevron-down.tsx b/libs/ui-toolkit/src/components/accordion/chevron-down.tsx deleted file mode 100644 index 70e2e0c80..000000000 --- a/libs/ui-toolkit/src/components/accordion/chevron-down.tsx +++ /dev/null @@ -1,31 +0,0 @@ -export const ChevronDownIcon = ({ active }: ChevronDownIconProps) => { - const rotate = active - ? 'transform duration-300 ease rotate-180' - : 'transform duration-300 ease'; - return ( - - - - - - - - - - ); -}; - -export interface ChevronDownIconProps { - active: boolean; -} - -export default ChevronDownIcon;