Style buttons
This commit is contained in:
parent
85e86798fc
commit
cd96cbf15d
@ -240,11 +240,35 @@ function Diagram() {
|
|||||||
>
|
>
|
||||||
🆕 New Diagram
|
🆕 New Diagram
|
||||||
</button>
|
</button>
|
||||||
<button onClick={handleSave} className="btn" style={{ marginLeft: 8 }}>💾 Save</button>
|
<button onClick={handleSave} className="btn" style={{ marginLeft: 8, background: 'green' }}>💾 Save</button>
|
||||||
<button onClick={handleAddNode} className="btn" style={{ marginLeft: 8 }}>➕ Add Node</button>
|
<button onClick={handleAddNode} className="btn" style={{ marginLeft: 8, background: 'blue' }}>➕ Add Node</button>
|
||||||
<button onClick={handleDeleteNode} className="btn" style={{ marginLeft: 8 }} disabled={!selectedNode}>🗑️ Delete Node</button>
|
<button
|
||||||
<button onClick={handleDeleteEdge} className="btn" style={{ marginLeft: 8 }} disabled={!selectedEdge}>🗑️ Delete Edge</button>
|
onClick={handleDeleteNode}
|
||||||
<button onClick={handleDeleteDiagram} className="btn" style={{ marginLeft: 8 }}>🗑️ Delete Diagram</button>
|
className="btn"
|
||||||
|
style={{
|
||||||
|
marginLeft: 8,
|
||||||
|
background: selectedNode ? '#b81a1a' : '#ccc',
|
||||||
|
color: selectedNode ? 'white' : '#666',
|
||||||
|
cursor: selectedNode ? 'pointer' : 'not-allowed',
|
||||||
|
}}
|
||||||
|
disabled={!selectedNode}
|
||||||
|
>
|
||||||
|
🗑️ Delete Node
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={handleDeleteEdge}
|
||||||
|
className="btn"
|
||||||
|
style={{
|
||||||
|
marginLeft: 8,
|
||||||
|
background: selectedNode ? '#b81a1a' : '#ccc',
|
||||||
|
color: selectedNode ? 'white' : '#666',
|
||||||
|
cursor: selectedNode ? 'pointer' : 'not-allowed',
|
||||||
|
}}
|
||||||
|
disabled={!selectedEdge}
|
||||||
|
>
|
||||||
|
🗑️ Delete Edge
|
||||||
|
</button>
|
||||||
|
<button onClick={handleDeleteDiagram} className="btn" style={{ marginLeft: 8, background: 'red' }}>🗑️ Delete Diagram</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{showForm && (
|
{showForm && (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user