diff --git a/components/dropdown/index.tsx b/components/dropdown/index.tsx index a2f370ad..21869b9c 100644 --- a/components/dropdown/index.tsx +++ b/components/dropdown/index.tsx @@ -5,16 +5,23 @@ import ButtonTextIconOutlined from "../buttons/text-icon-outlined"; export interface DropdownProps { text: string, + display?: boolean, + onClick?: () => void } export default function Dropdown({ children, props }: { children: ReactNode, props: DropdownProps }) { - const [display, setDisplay] = useState(false); + const [display, setDisplay] = useState(props.display ?? false); return (
{ + if (props.onClick) { + props.onClick() + console.log("Clicked") + } + setDisplay(!display); } }}>