Replace .edgebutton 'x' text with <IconX/> (#4035)

replace .edgebutton 'x' text with <IconX/>
This commit is contained in:
Matt Smith
2025-02-25 07:28:21 -05:00
committed by GitHub
parent ac138a7a27
commit 3290798d4b
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import { useDispatch } from 'react-redux'
import { useContext } from 'react' import { useContext } from 'react'
import { SET_DIRTY } from '@/store/actions' import { SET_DIRTY } from '@/store/actions'
import { flowContext } from '@/store/context/ReactFlowContext' import { flowContext } from '@/store/context/ReactFlowContext'
import { IconX } from '@tabler/icons-react'
import './index.css' import './index.css'
@@ -53,7 +54,7 @@ const ButtonEdge = ({ id, sourceX, sourceY, targetX, targetY, sourcePosition, ta
> >
<div> <div>
<button className='edgebutton' onClick={(event) => onEdgeClick(event, id)}> <button className='edgebutton' onClick={(event) => onEdgeClick(event, id)}>
× <IconX stroke={2} size='12' />
</button> </button>
</div> </div>
</foreignObject> </foreignObject>
+4 -2
View File
@@ -1,12 +1,14 @@
.edgebutton { .edgebutton {
width: 20px; width: 20px;
height: 20px; height: 20px;
display: flex;
justify-content: center;
align-items: center;
padding: 0;
background: #eee; background: #eee;
border: 1px solid #fff; border: 1px solid #fff;
cursor: pointer; cursor: pointer;
border-radius: 50%; border-radius: 50%;
font-size: 12px;
line-height: 1;
} }
.edgebutton:hover { .edgebutton:hover {