-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix react flow slowness due to css and and add switch to orientation …
…button
- Loading branch information
1 parent
59bdb2d
commit 034eff4
Showing
6 changed files
with
133 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
import { Handle, Node, NodeProps, Position } from "@xyflow/react"; | ||
import { memo } from "react"; | ||
|
||
export default memo(function GroupNode( | ||
props: NodeProps<Node<{ path: string }>>, | ||
) { | ||
export default function GroupNode(props: NodeProps<Node<{ path: string }>>) { | ||
return ( | ||
<> | ||
<div className="backdrop-blur-sm bg-[#FFFFFF1A] rounded-xl border border-border-light dark:border-border-dark"> | ||
<Handle | ||
type="target" | ||
position={Position.Top} | ||
className="border border-gray-light dark:border-gray-dark" | ||
/> | ||
<div className="text-center font-bold p-5">/{props.data.path}</div> | ||
<Handle | ||
type="source" | ||
position={Position.Bottom} | ||
className="border border-gray-light dark:border-gray-dark" | ||
/> | ||
</div> | ||
</> | ||
<div className="bg-secondarySurface-light dark:bg-secondarySurface-dark rounded-xl border border-border-light dark:border-border-dark"> | ||
<Handle | ||
type="target" | ||
position={props.targetPosition || Position.Top} | ||
isConnectable={props.isConnectable} | ||
className="border border-gray-light dark:border-gray-dark" | ||
/> | ||
<div className="text-center font-bold p-5">/{props.data.path}</div> | ||
<Handle | ||
type="source" | ||
position={props.sourcePosition || Position.Bottom} | ||
isConnectable={props.isConnectable} | ||
className="border border-gray-light dark:border-gray-dark" | ||
/> | ||
</div> | ||
); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters