-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
532 additions
and
143 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
body { | ||
background-image: linear-gradient(90deg, #cdffd8, #94b9ff); | ||
} | ||
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
import React from "react"; | ||
import { Link } from "react-router-dom"; | ||
import { createPopper } from "@popperjs/core"; | ||
|
||
const Dropdown = () => { | ||
// dropdown props | ||
const [dropdownPopoverShow, setDropdownPopoverShow] = React.useState(false); | ||
const btnDropdownRef = React.createRef(); | ||
const popoverDropdownRef = React.createRef(); | ||
const openDropdownPopover = () => { | ||
createPopper(btnDropdownRef.current, popoverDropdownRef.current, { | ||
placement: "bottom-start", | ||
}); | ||
setDropdownPopoverShow(true); | ||
}; | ||
const closeDropdownPopover = () => { | ||
setDropdownPopoverShow(false); | ||
}; | ||
return ( | ||
<> | ||
<a | ||
className="hover:text-blueGray-500 text-blueGray-700 px-3 py-4 lg:py-2 flex items-center text-xs uppercase font-bold" | ||
href="#pablo" | ||
ref={btnDropdownRef} | ||
onClick={(e) => { | ||
e.preventDefault(); | ||
dropdownPopoverShow ? closeDropdownPopover() : openDropdownPopover(); | ||
}} | ||
> | ||
Pages | ||
</a> | ||
<div | ||
ref={popoverDropdownRef} | ||
className={ | ||
(dropdownPopoverShow ? "block " : "hidden ") + | ||
"bg-white text-base z-50 float-left py-2 list-none text-left rounded shadow-lg min-w-48" | ||
} | ||
> | ||
<span | ||
className={ | ||
"text-sm pt-2 pb-0 px-4 font-bold block w-full whitespace-nowrap bg-transparent text-blueGray-400" | ||
} | ||
> | ||
Admin Layout | ||
</span> | ||
<Link | ||
to="/admin/dashboard" | ||
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700" | ||
> | ||
Dashboard | ||
</Link> | ||
<Link | ||
to="/admin/settings" | ||
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700" | ||
> | ||
Settings | ||
</Link> | ||
<Link | ||
to="/admin/tables" | ||
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700" | ||
> | ||
Tables | ||
</Link> | ||
<div className="h-0 mx-4 my-2 border border-solid border-blueGray-100" /> | ||
<span | ||
className={ | ||
"text-sm pt-2 pb-0 px-4 font-bold block w-full whitespace-nowrap bg-transparent text-blueGray-400" | ||
} | ||
> | ||
Auth Layout | ||
</span> | ||
<Link | ||
to="/auth/login" | ||
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700" | ||
> | ||
Login | ||
</Link> | ||
<Link | ||
to="/auth/register" | ||
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700" | ||
> | ||
Register | ||
</Link> | ||
<div className="h-0 mx-4 my-2 border border-solid border-blueGray-100" /> | ||
<span | ||
className={ | ||
"text-sm pt-2 pb-0 px-4 font-bold block w-full whitespace-nowrap bg-transparent text-blueGray-400" | ||
} | ||
> | ||
No Layout | ||
</span> | ||
<Link | ||
to="/landing" | ||
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700" | ||
> | ||
Landing | ||
</Link> | ||
<Link | ||
to="/profile" | ||
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700" | ||
> | ||
Profile | ||
</Link> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default Dropdown; |
Oops, something went wrong.