Removed status when not built, adjusted Loading to have a Size
This commit is contained in:
parent
6716a90c0f
commit
1b23952026
2 changed files with 9 additions and 17 deletions
|
|
@ -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 <Loading className="text-medium-indigo" />;
|
||||
return <Loading className="mr-1 text-medium-indigo" size={20} />;
|
||||
} else {
|
||||
return (
|
||||
<>
|
||||
|
|
@ -30,21 +26,13 @@ const useIconStatus = (
|
|||
className="h-6 w-6 stroke-2 text-status-green transition-all"
|
||||
isVisible={true}
|
||||
/>
|
||||
) : conditionInactive ? (
|
||||
<ForwardedIconComponent
|
||||
name="Ellipsis"
|
||||
className="h-6 w-6 fill-current stroke-2 text-status-gray opacity-30"
|
||||
/>
|
||||
) : conditionError ? (
|
||||
<Xmark
|
||||
isVisible={true}
|
||||
className="h-6 w-6 fill-current stroke-2 text-status-red"
|
||||
/>
|
||||
) : (
|
||||
<ForwardedIconComponent
|
||||
name="Ellipsis"
|
||||
className="h-6 w-6 fill-current stroke-2 text-status-gray opacity-70"
|
||||
/>
|
||||
<></>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
import { SVGProps } from "react";
|
||||
|
||||
export type LoadingProps = SVGProps<SVGSVGElement> & {
|
||||
size?: number;
|
||||
};
|
||||
|
||||
// https://github.com/feathericons/feather/issues/695#issuecomment-1503699643
|
||||
export const Loading = (props: SVGProps<SVGSVGElement>) => (
|
||||
export const Loading = ({ size = 24, ...props }: LoadingProps) => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={24}
|
||||
height={24}
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue