add tooltip to the run buton

pull/5370/head
Joseph Izang 2 years ago
parent f1d1b10ec5
commit 4e850582c6
  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