feat: hides label height control when no label present

This commit is contained in:
Mark Mankarious
2023-08-21 13:21:43 +01:00
parent 5c9e3e0910
commit 82977bfa26

View File

@@ -28,18 +28,20 @@ export const NodeSettings = ({
}}
/>
</Section>
<Section title="Label height">
<Slider
marks
step={20}
min={60}
max={280}
value={labelHeight}
onChange={(e, newHeight) => {
onUpdate({ labelHeight: newHeight as number });
}}
/>
</Section>
{label && (
<Section title="Label height">
<Slider
marks
step={20}
min={60}
max={280}
value={labelHeight}
onChange={(e, newHeight) => {
onUpdate({ labelHeight: newHeight as number });
}}
/>
</Section>
)}
<Section>
<Box>
<DeleteButton onClick={onDelete} />