Merge branch 'dev' into two_edges

This commit is contained in:
Lucas Oliveira 2024-06-11 18:46:02 -03:00
commit 5400f61447
5 changed files with 12 additions and 20 deletions

View file

@ -315,7 +315,7 @@ export default function ParameterComponent({
{info !== "" && ( {info !== "" && (
<ShadTooltip content={infoHtml.current}> <ShadTooltip content={infoHtml.current}>
{/* put div to avoid bug that does not display tooltip */} {/* put div to avoid bug that does not display tooltip */}
<div> <div className="cursor-help">
<IconComponent <IconComponent
name="Info" name="Info"
className="relative bottom-px ml-1.5 h-3 w-4" className="relative bottom-px ml-1.5 h-3 w-4"

View file

@ -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"
/>
)} )}
</> </>
); );

View file

@ -80,7 +80,7 @@ export default function SingleAlert({
className="mx-2 mb-2 flex rounded-md bg-info-background p-3" className="mx-2 mb-2 flex rounded-md bg-info-background p-3"
key={dropItem.id} key={dropItem.id}
> >
<div className="flex-shrink-0"> <div className="flex-shrink-0 cursor-help">
<IconComponent <IconComponent
name="Info" name="Info"
className="h-5 w-5 text-status-blue " className="h-5 w-5 text-status-blue "

View file

@ -39,7 +39,7 @@ export default function NoticeAlert({
className="nocopy nowheel nopan nodelete nodrag noundo mt-6 w-96 rounded-md bg-info-background p-4 shadow-xl" className="nocopy nowheel nopan nodelete nodrag noundo mt-6 w-96 rounded-md bg-info-background p-4 shadow-xl"
> >
<div className="flex"> <div className="flex">
<div className="flex-shrink-0"> <div className="flex-shrink-0 cursor-help">
<IconComponent <IconComponent
name="Info" name="Info"
className="h-5 w-5 text-status-blue " className="h-5 w-5 text-status-blue "

View file

@ -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"