add: accordion component

This commit is contained in:
Mahyar Khanbolooki
2025-08-11 21:03:22 +03:30
parent f962000b1f
commit 18f56afd82
2 changed files with 96 additions and 2 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import { useState } from 'react'
const useToggle = () => {
const [state, setState] = useState<boolean>(false);
const useToggle = (initial?: boolean) => {
const [state, setState] = useState<boolean>(initial ?? false);
const toggle = (e?: React.MouseEvent | null) => {
if (e) {