add tooltip to the run buton

pull/3005/head
Joseph Izang 2 years ago
parent 62a6f4d001
commit 155edaa3dd
  1. 14
      libs/remix-ui/static-analyser/src/lib/Button/StaticAnalyserButton.tsx

@ -1,4 +1,5 @@
import React from 'react' //eslint-disable-line
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
interface StaticAnalyserButtonProps {
onClick: (event) => void
@ -16,8 +17,19 @@ const StaticAnalyserButton = ({
let classList = "btn btn-sm w-25 btn-primary"
classList += disabled ? " disabled" : ""
return (
<button className={classList} disabled={disabled} title={title} onClick={onClick}>
<button className={classList} disabled={disabled} onClick={onClick}>
<OverlayTrigger
placement="bottom-start"
overlay={
<Tooltip id="ssaRunButtonTooltip" className="text-nowrap">
<span>{title}</span>
</Tooltip>
}
>
<span>
{buttonText}
</span>
</OverlayTrigger>
</button>
)
}

Loading…
Cancel
Save