feat: add dropdown component

This commit is contained in:
Sonny
2024-05-12 20:06:05 +02:00
committed by Sonny
parent 3531038321
commit 0f1dc9b69c
13 changed files with 142 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
import { useState } from 'react';
const useModal = (defaultValue: boolean = false) => {
const useToggle = (defaultValue: boolean = false) => {
const [isShowing, setIsShowing] = useState<boolean>(defaultValue);
const toggle = () => setIsShowing((value) => !value);
@@ -15,4 +15,4 @@ const useModal = (defaultValue: boolean = false) => {
};
};
export default useModal;
export default useToggle;