Merge pull request #3798 from ethereum/workspaceHT

Tooltip for workspace's hamburger
pull/5370/head
yann300 1 year ago committed by GitHub
commit 58ba58a33c
  1. 12
      libs/remix-ui/helper/src/lib/components/custom-dropdown.tsx

@ -1,6 +1,8 @@
// The forwardRef is important!! // The forwardRef is important!!
import React, { Ref } from "react" import React, { Ref } from "react"
import { CustomTooltip } from '@remix-ui/helper'
// Dropdown needs access to the DOM node in order to position the Menu // Dropdown needs access to the DOM node in order to position the Menu
export const CustomToggle = React.forwardRef(({ children, onClick, icon, className = '' }: { children: React.ReactNode, onClick: (e) => void, icon: string, className: string }, ref: Ref<HTMLButtonElement>) => ( export const CustomToggle = React.forwardRef(({ children, onClick, icon, className = '' }: { children: React.ReactNode, onClick: (e) => void, icon: string, className: string }, ref: Ref<HTMLButtonElement>) => (
@ -30,7 +32,15 @@ export const CustomIconsToggle = React.forwardRef(({ onClick, icon, className =
className={`${className.replace('dropdown-toggle', '')} mr-1 mb-0 pb-0 d-flex justify-content-end align-items-end remixuimenuicon_shadow remixuimenuicon_hamburger_menu fs-3`} className={`${className.replace('dropdown-toggle', '')} mr-1 mb-0 pb-0 d-flex justify-content-end align-items-end remixuimenuicon_shadow remixuimenuicon_hamburger_menu fs-3`}
data-id="workspaceMenuDropdown" data-id="workspaceMenuDropdown"
> >
{ icon && <i style={{ fontSize: 'large' }} className={`${icon}`} data-id="workspaceDropdownMenuIcon"></i> } { icon && <CustomTooltip
placement={"top"}
tooltipClasses="text-nowrap text-left"
tooltipId="remixHamburgerTooltip"
tooltipText='Workspace actions'
>
<i style={{ fontSize: 'large' }} className={`${icon}`} data-id="workspaceDropdownMenuIcon"></i>
</CustomTooltip>
}
</span> </span>
)) ))

Loading…
Cancel
Save