Skip to content

Commit

Permalink
Fix node size in nodeComponent (#3450)
Browse files Browse the repository at this point in the history
* fix: set nide size directly in the nodeComponent

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
anovazzi1 and autofix-ci[bot] authored Aug 20, 2024
1 parent ef08300 commit c267cd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ export default function NodeStatus({
return frozen ? frozenClass : className;
};

const getNodeSizeClass = (showNode) =>
showNode ? "w-96 rounded-lg" : "w-26 h-26 rounded-full";

const getNodeBorderClassName = (
selected: boolean,
showNode: boolean,
Expand All @@ -87,10 +84,8 @@ export default function NodeStatus({
);

const baseBorderClass = getBaseBorderClass(selected);
const nodeSizeClass = getNodeSizeClass(showNode);
const names = classNames(
baseBorderClass,
nodeSizeClass,
"generic-node-div group/node",
specificClassFromBuildStatus,
);
Expand Down
7 changes: 6 additions & 1 deletion src/frontend/src/CustomNodes/GenericNode/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,12 @@ export default function GenericNode({
return (
<>
{memoizedNodeToolbarComponent}
<div className={borderColor}>
<div
className={cn(
borderColor,
showNode ? "w-96 rounded-lg" : "w-26 h-26 rounded-full",
)}
>
{data.node?.beta && showNode && (
<div className="beta-badge-wrapper">
<div className="beta-badge-content">BETA</div>
Expand Down

0 comments on commit c267cd6

Please sign in to comment.