From 1b23952026f032012192b897cda3861823ad8778 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Tue, 11 Jun 2024 18:42:34 -0300 Subject: [PATCH] Removed status when not built, adjusted Loading to have a Size --- .../src/CustomNodes/hooks/use-icons-status.tsx | 16 ++-------------- src/frontend/src/components/ui/loading.tsx | 10 +++++++--- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx index 923943e03..42e8b64b3 100644 --- a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx @@ -11,17 +11,13 @@ const useIconStatus = ( validationStatus: VertexBuildTypeAPI | null, ) => { const conditionSuccess = validationStatus && validationStatus.valid; - const conditionInactive = - validationStatus && - !validationStatus.valid && - buildStatus === BuildStatus.INACTIVE; const conditionError = buildStatus === BuildStatus.ERROR || (validationStatus && !validationStatus.valid); const renderIconStatus = () => { if (buildStatus === BuildStatus.BUILDING) { - return ; + return ; } else { return ( <> @@ -30,21 +26,13 @@ const useIconStatus = ( className="h-6 w-6 stroke-2 text-status-green transition-all" isVisible={true} /> - ) : conditionInactive ? ( - ) : conditionError ? ( ) : ( - + <> )} ); diff --git a/src/frontend/src/components/ui/loading.tsx b/src/frontend/src/components/ui/loading.tsx index 7de6c8a6a..2e81bacf9 100644 --- a/src/frontend/src/components/ui/loading.tsx +++ b/src/frontend/src/components/ui/loading.tsx @@ -1,11 +1,15 @@ import { SVGProps } from "react"; +export type LoadingProps = SVGProps & { + size?: number; +}; + // https://github.com/feathericons/feather/issues/695#issuecomment-1503699643 -export const Loading = (props: SVGProps) => ( +export const Loading = ({ size = 24, ...props }: LoadingProps) => (