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,
|
validationStatus: VertexBuildTypeAPI | null,
|
||||||
) => {
|
) => {
|
||||||
const conditionSuccess = validationStatus && validationStatus.valid;
|
const conditionSuccess = validationStatus && validationStatus.valid;
|
||||||
const conditionInactive =
|
|
||||||
validationStatus &&
|
|
||||||
!validationStatus.valid &&
|
|
||||||
buildStatus === BuildStatus.INACTIVE;
|
|
||||||
const conditionError =
|
const conditionError =
|
||||||
buildStatus === BuildStatus.ERROR ||
|
buildStatus === BuildStatus.ERROR ||
|
||||||
(validationStatus && !validationStatus.valid);
|
(validationStatus && !validationStatus.valid);
|
||||||
|
|
||||||
const renderIconStatus = () => {
|
const renderIconStatus = () => {
|
||||||
if (buildStatus === BuildStatus.BUILDING) {
|
if (buildStatus === BuildStatus.BUILDING) {
|
||||||
return <Loading className="text-medium-indigo" />;
|
return <Loading className="mr-1 text-medium-indigo" size={20} />;
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
@ -30,21 +26,13 @@ const useIconStatus = (
|
||||||
className="h-6 w-6 stroke-2 text-status-green transition-all"
|
className="h-6 w-6 stroke-2 text-status-green transition-all"
|
||||||
isVisible={true}
|
isVisible={true}
|
||||||
/>
|
/>
|
||||||
) : conditionInactive ? (
|
|
||||||
<ForwardedIconComponent
|
|
||||||
name="Ellipsis"
|
|
||||||
className="h-6 w-6 fill-current stroke-2 text-status-gray opacity-30"
|
|
||||||
/>
|
|
||||||
) : conditionError ? (
|
) : conditionError ? (
|
||||||
<Xmark
|
<Xmark
|
||||||
isVisible={true}
|
isVisible={true}
|
||||||
className="h-6 w-6 fill-current stroke-2 text-status-red"
|
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";
|
import { SVGProps } from "react";
|
||||||
|
|
||||||
|
export type LoadingProps = SVGProps<SVGSVGElement> & {
|
||||||
|
size?: number;
|
||||||
|
};
|
||||||
|
|
||||||
// https://github.com/feathericons/feather/issues/695#issuecomment-1503699643
|
// https://github.com/feathericons/feather/issues/695#issuecomment-1503699643
|
||||||
export const Loading = (props: SVGProps<SVGSVGElement>) => (
|
export const Loading = ({ size = 24, ...props }: LoadingProps) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
width={24}
|
width={size}
|
||||||
height={24}
|
height={size}
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue