|
|
@ -1,5 +1,6 @@ |
|
|
|
import { CustomTooltip } from '@remix-ui/helper' |
|
|
|
import { CustomTooltip } from '@remix-ui/helper' |
|
|
|
import React from 'react' //eslint-disable-line
|
|
|
|
import React from 'react' //eslint-disable-line
|
|
|
|
|
|
|
|
import '../ssa.css' |
|
|
|
|
|
|
|
|
|
|
|
interface StaticAnalyserButtonProps { |
|
|
|
interface StaticAnalyserButtonProps { |
|
|
|
onClick: (event) => void |
|
|
|
onClick: (event) => void |
|
|
@ -21,7 +22,12 @@ const StaticAnalyserButton = ({ |
|
|
|
classList.length === 0 && disabled ? `${defaultStyle} disabled` : classList.length > 0 ? `${classList}` : defaultStyle |
|
|
|
classList.length === 0 && disabled ? `${defaultStyle} disabled` : classList.length > 0 ? `${classList}` : defaultStyle |
|
|
|
|
|
|
|
|
|
|
|
const buttonWithoutTooltip = () => ( |
|
|
|
const buttonWithoutTooltip = () => ( |
|
|
|
<button id="staticAnalysisRunBtn" className={newclassList} disabled={disabled} onClick={onClick}> |
|
|
|
<button |
|
|
|
|
|
|
|
id="staticAnalysisRunBtn" |
|
|
|
|
|
|
|
className={newclassList} |
|
|
|
|
|
|
|
disabled={disabled} |
|
|
|
|
|
|
|
onClick={onClick} |
|
|
|
|
|
|
|
> |
|
|
|
<span className="pl-3 pr-4"> |
|
|
|
<span className="pl-3 pr-4"> |
|
|
|
{buttonText} |
|
|
|
{buttonText} |
|
|
|
</span> |
|
|
|
</span> |
|
|
@ -29,18 +35,27 @@ const StaticAnalyserButton = ({ |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const buttonWithTooltip = () => ( |
|
|
|
const buttonWithTooltip = () => ( |
|
|
|
<button id="staticAnalysisRunBtn" className={newclassList} disabled={disabled} onClick={onClick}> |
|
|
|
|
|
|
|
<CustomTooltip |
|
|
|
<CustomTooltip |
|
|
|
placement="right" |
|
|
|
placement="right" |
|
|
|
tooltipId="ssaRunButtonTooltip" |
|
|
|
tooltipId="ssaRunButtonTooltip" |
|
|
|
tooltipClasses="text-nowrap" |
|
|
|
tooltipClasses="text-nowrap" |
|
|
|
tooltipText={title} |
|
|
|
tooltipText={title} |
|
|
|
> |
|
|
|
> |
|
|
|
<span className="pl-3 pr-4"> |
|
|
|
<div id="staticAnalysisWrapper" className={newclassList}> |
|
|
|
{buttonText} |
|
|
|
<button |
|
|
|
</span> |
|
|
|
id="staticAnalysisRunBtn" |
|
|
|
|
|
|
|
className={newclassList} |
|
|
|
|
|
|
|
disabled={disabled} |
|
|
|
|
|
|
|
onClick={onClick} |
|
|
|
|
|
|
|
style={{ pointerEvents: 'none', color: 'white' }} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<span className="pl-3 pr-4"> |
|
|
|
|
|
|
|
{buttonText} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
</div> |
|
|
|
</CustomTooltip> |
|
|
|
</CustomTooltip> |
|
|
|
</button>) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
title && title.length > 0 ? buttonWithTooltip() : buttonWithoutTooltip() |
|
|
|
title && title.length > 0 ? buttonWithTooltip() : buttonWithoutTooltip() |
|
|
|