Add ping animation to update button
This commit is contained in:
parent
fec3451d93
commit
13f2881f00
3 changed files with 9 additions and 3 deletions
|
|
@ -477,6 +477,7 @@ export default function NodeToolbarComponent({
|
|||
value={"Update"}
|
||||
icon={"Code"}
|
||||
dataTestId="update-button-modal"
|
||||
ping={isOutdated}
|
||||
/>
|
||||
</SelectItem>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -707,4 +707,5 @@ export type toolbarSelectItemProps = {
|
|||
valueClasses?: string;
|
||||
};
|
||||
dataTestId: string;
|
||||
ping?: boolean;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue