Add skeleton for dropdown component
This commit is contained in:
parent
4ad42312b1
commit
73c49252f6
2 changed files with 25 additions and 0 deletions
19
components/ui/Dropdown.tsx
Normal file
19
components/ui/Dropdown.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { useState } from "react";
|
||||
import Button from "./Button";
|
||||
|
||||
export default function Dropdown({ children }: { children: React.ReactNode }) {
|
||||
const [dropped, setDropped] = useState<boolean>(false);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Button
|
||||
title="Drop down"
|
||||
mode="DARK"
|
||||
onClick={() => {
|
||||
setDropped(!dropped);
|
||||
}}
|
||||
></Button>
|
||||
{dropped && <div>{children}</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue