Commit 4a7ca48c authored by Max Alekseenko's avatar Max Alekseenko

add tooltip for security score on app page

parent 5b1871cc
...@@ -54,6 +54,7 @@ const AppSecurityReport = ({ id, securityReport, height, showContractList, isLoa ...@@ -54,6 +54,7 @@ const AppSecurityReport = ({ id, securityReport, height, showContractList, isLoa
onClick={ handleButtonClick } onClick={ handleButtonClick }
height={ height } height={ height }
onlyIcon={ onlyIcon } onlyIcon={ onlyIcon }
label="The security score is based on analysis of a DApp's smart contracts."
/> />
</PopoverTrigger> </PopoverTrigger>
<PopoverContent w={{ base: '100vw', lg: '328px' }}> <PopoverContent w={{ base: '100vw', lg: '328px' }}>
......
...@@ -13,16 +13,17 @@ interface Props { ...@@ -13,16 +13,17 @@ interface Props {
height?: string; height?: string;
onlyIcon?: boolean; onlyIcon?: boolean;
onClick?: () => void; onClick?: () => void;
label?: string;
} }
const SolidityscanReportButton = ( const SolidityscanReportButton = (
{ className, score, isLoading, height = '32px', onlyIcon, onClick }: Props, { className, score, isLoading, height = '32px', onlyIcon, onClick, label = 'Security score' }: Props,
ref: React.ForwardedRef<HTMLButtonElement>, ref: React.ForwardedRef<HTMLButtonElement>,
) => { ) => {
const { scoreColor } = useScoreLevelAndColor(score); const { scoreColor } = useScoreLevelAndColor(score);
return ( return (
<PopoverTriggerTooltip label="Security score" isLoading={ isLoading } className={ className }> <PopoverTriggerTooltip label={ label } isLoading={ isLoading } className={ className }>
<Button <Button
ref={ ref } ref={ ref }
color={ scoreColor } color={ scoreColor }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment