-
Notifications
You must be signed in to change notification settings - Fork 359
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
1 parent
c5a8d9d
commit ff192d6
Showing
12 changed files
with
53 additions
and
42 deletions.
There are no files selected for viewing
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
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
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
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
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 |
---|---|---|
|
@@ -8,18 +8,19 @@ import { DropdownItem } from "../ui/dropdown/DropdownItem"; | |
export default function UserDropdown() { | ||
const [isOpen, setIsOpen] = useState(false); | ||
|
||
function toggleDropdown() { | ||
setIsOpen(!isOpen); | ||
} | ||
function toggleDropdown(e: React.MouseEvent<HTMLButtonElement, MouseEvent>) { | ||
e.stopPropagation(); | ||
setIsOpen((prev) => !prev); | ||
} | ||
|
||
function closeDropdown() { | ||
setIsOpen(false); | ||
} | ||
return ( | ||
<div className="relative"> | ||
<button | ||
onClick={toggleDropdown} | ||
className="flex items-center text-gray-700 dark:text-gray-400" | ||
onClick={toggleDropdown} className="dropdown-toggle" | ||
className="flex items-center text-gray-700 dark:text-gray-400 dropdown-toggle" | ||
> | ||
<span className="mr-3 overflow-hidden rounded-full h-11 w-11"> | ||
<Image | ||
|
@@ -30,9 +31,7 @@ export default function UserDropdown() { | |
/> | ||
</span> | ||
|
||
<span className="block mr-1 font-medium text-theme-sm"> | ||
Musharof | ||
</span> | ||
<span className="block mr-1 font-medium text-theme-sm">Musharof</span> | ||
|
||
<svg | ||
className={`stroke-gray-500 dark:stroke-gray-400 transition-transform duration-200 ${ | ||
|
@@ -61,10 +60,10 @@ export default function UserDropdown() { | |
> | ||
<div> | ||
<span className="block font-medium text-gray-700 text-theme-sm dark:text-gray-400"> | ||
Musharof Chowdury | ||
Musharof Chowdhury | ||
</span> | ||
<span className="mt-0.5 block text-theme-xs text-gray-500 dark:text-gray-400"> | ||
[email protected] | ||
[email protected] | ||
</span> | ||
</div> | ||
|
||
|
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
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