REFACTOR for consistent syntax
This commit is contained in:
@@ -47,12 +47,12 @@ const Dropdown = ({ label, children, className }: DropdownProps) => {
|
||||
ref={ref}>
|
||||
<button
|
||||
onClick={toggleDropdown}
|
||||
className="inline-flex justify-between w-full rounded-xl px-4 py-2 bg-white text-sm font-medium text-gray-600 hover:bg-gray-50"
|
||||
className={"inline-flex justify-between w-full rounded-xl px-4 py-2 bg-white text-sm font-medium text-gray-600 hover:bg-gray-50"}
|
||||
>
|
||||
{label}
|
||||
</button>
|
||||
{isOpen && (
|
||||
<ul className="absolute w-48 origin-top-right rounded-md bg-white shadow-lg font-medium">
|
||||
<ul className={"absolute w-48 origin-top-right rounded-md bg-white shadow-lg font-medium"}>
|
||||
{children}
|
||||
</ul>
|
||||
)}
|
||||
|
||||
@@ -12,7 +12,7 @@ const Selector = ({children, label}: props) => {
|
||||
className={"w-full"}>
|
||||
{ label }
|
||||
</label>
|
||||
<div className="w-px h-6 bg-gray-400 mx-3" />
|
||||
<div className={"w-px h-6 bg-gray-400 mx-3"} />
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -31,7 +31,9 @@ const Topbar = ({sidebarToggled, setSidebarToggled, user, className}: props) =>
|
||||
/>
|
||||
|
||||
<Dropdown label={user.name}>
|
||||
<DropdownItem item="Logout" onClick={() => globalThis.location.href = logoutUrl} className={"text-red-500 font-medium"} />
|
||||
<DropdownItem item="Logout"
|
||||
onClick={() => globalThis.location.href = logoutUrl}
|
||||
className={"text-red-500 font-medium"} />
|
||||
</Dropdown>
|
||||
</div>
|
||||
) :
|
||||
|
||||
Reference in New Issue
Block a user