fix(ui): workflow branch edge

This commit is contained in:
Fu Diwei 2025-01-03 21:35:12 +08:00
parent 52ee3863ae
commit b7cd07c996
2 changed files with 4 additions and 4 deletions

View File

@ -45,7 +45,7 @@ const AddNode = ({ node: supnode }: NodeProps | BrandNodeProps) => {
}; };
return ( return (
<div className="relative py-6 before:absolute before:left-[50%] before:top-0 before:h-full before:w-[2px] before:-translate-x-[50%] before:bg-stone-200 before:content-['']"> <div className="relative py-6 before:absolute before:left-1/2 before:top-0 before:h-full before:w-[2px] before:-translate-x-1/2 before:bg-stone-200 before:content-['']">
<Dropdown <Dropdown
menu={{ menu={{
items: dropdownMenus.map((item) => { items: dropdownMenus.map((item) => {

View File

@ -32,9 +32,9 @@ const BranchNode = ({ node }: BrandNodeProps) => {
return ( return (
<> <>
<div className="relative flex gap-x-16 before:absolute before:inset-x-[128px] before:top-0 before:h-[2px] before:bg-stone-200 before:content-['']"> <div className="relative flex gap-x-16 before:absolute before:inset-x-[128px] before:top-0 before:h-[2px] before:bg-stone-200 before:content-[''] after:absolute after:inset-x-[128px] after:bottom-0 after:h-[2px] after:bg-stone-200 after:content-['']">
<Button <Button
className="absolute left-[50%] z-[1] -translate-x-1/2 -translate-y-1/2 text-xs" className="absolute left-1/2 z-[1] -translate-x-1/2 -translate-y-1/2 text-xs"
size="small" size="small"
shape="round" shape="round"
variant="outlined" variant="outlined"
@ -48,7 +48,7 @@ const BranchNode = ({ node }: BrandNodeProps) => {
{node.branches!.map((branch, index) => ( {node.branches!.map((branch, index) => (
<div <div
key={branch.id} key={branch.id}
className="relative flex flex-col items-center before:absolute before:left-[50%] before:top-0 before:h-full before:w-[2px] before:-translate-x-[50%] before:bg-stone-200 before:content-['']" className="relative flex flex-col items-center before:absolute before:left-1/2 before:top-0 before:h-full before:w-[2px] before:-translate-x-1/2 before:bg-stone-200 before:content-['']"
> >
<div className="relative flex flex-col items-center">{renderNodes(branch, node.id, index)}</div> <div className="relative flex flex-col items-center">{renderNodes(branch, node.id, index)}</div>
</div> </div>