Add ping animation to update button

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-25 15:44:32 -03:00
commit 13f2881f00
3 changed files with 9 additions and 3 deletions

View file

@ -477,6 +477,7 @@ export default function NodeToolbarComponent({
value={"Update"}
icon={"Code"}
dataTestId="update-button-modal"
ping={isOutdated}
/>
</SelectItem>
)}

View file

@ -9,14 +9,18 @@ export default function ToolbarSelectItem({
icon,
styleObj,
dataTestId,
ping,
}: toolbarSelectItemProps) {
return (
<div className="flex" data-testid={dataTestId}>
<ForwardedIconComponent
name={icon}
className={`relative top-0.5 mr-2 h-4 w-4 ${styleObj?.iconClasses}`}
/>{" "}
<span className={styleObj?.valueClasses}>{value}</span>{" "}
className={`relative top-0.5 mr-2 h-4 w-4 ${styleObj?.iconClasses} ${
ping && "animate-pulse text-green-500"
}`}
/>
<span className={styleObj?.valueClasses}>{value}</span>
{isMac ? (
<ForwardedIconComponent
name="Command"

View file

@ -707,4 +707,5 @@ export type toolbarSelectItemProps = {
valueClasses?: string;
};
dataTestId: string;
ping?: boolean;
};