fix caret bug. place tooltip correctly

pull/4891/head
Joseph Izang 5 months ago committed by Aniket
parent 89e1724f5a
commit b7f792247b
  1. 14
      libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx
  2. 6
      libs/remix-ui/tree-view/src/lib/tree-view-item/tree-view-item.tsx

@ -311,6 +311,12 @@ export const ContractSelection = (props: ContractSelectionProps) => {
</CustomTooltip>
</button>
<CustomTooltip
placement={'right-end'}
tooltipId="CompilationDetailsTooltip"
tooltipClasses="text-nowrap"
tooltipText={<FormattedMessage id="solidity.displayContractDetails" />}
>
<button
data-id="compilation-details"
className="btn btn-secondary btn-block"
@ -318,18 +324,12 @@ export const ContractSelection = (props: ContractSelectionProps) => {
details()
await (api as any).call('compilationDetails', 'showDetails', payload)
}}
>
<CustomTooltip
placement={'auto-end'}
tooltipId="CompilationDetailsTooltip"
tooltipClasses="text-nowrap"
tooltipText={<FormattedMessage id="solidity.displayContractDetails" />}
>
<span>
<FormattedMessage id="solidity.compilationDetails" />
</span>
</CustomTooltip>
</button>
</CustomTooltip>
{/* Copy to Clipboard */}
<div className="remixui_contractHelperButtons">
<div className="input-group">

@ -4,7 +4,7 @@ import { TreeViewItemProps } from '../../types'
import './tree-view-item.css'
export const TreeViewItem = (props: TreeViewItemProps) => {
const { id, children, label, labelClass, expand, iconX = 'fas fa-caret-right', iconY = '', icon, controlBehaviour = false, innerRef, showIcon = true, ...otherProps } = props
const { id, children, label, labelClass, expand, iconX = 'fas fa-caret-right', iconY = 'fas fa-caret-down', icon, controlBehaviour = false, innerRef, showIcon = true, ...otherProps } = props
const [isExpanded, setIsExpanded] = useState(false)
useEffect(() => {
@ -20,7 +20,9 @@ export const TreeViewItem = (props: TreeViewItemProps) => {
onClick={() => !controlBehaviour && setIsExpanded(!isExpanded)}
>
{children && showIcon ? (
<div className={isExpanded ? `pl-2 ${iconY}` : `pl-2 ${iconX} caret caret_tv`} style={{ visibility: children ? 'visible' : 'hidden' }}></div>
<div className={isExpanded ? `pl-2 ${iconY}` : `pl-2 ${iconX} caret caret_tv`}
style={{ visibility: children ? 'visible' : 'hidden' }}
></div>
) : icon ? (
<div className={`pr-2 pl-2 ${icon} caret caret_tv`}></div>
) : null}

Loading…
Cancel
Save