Skip to content

Commit 7daff74

Browse files
committed
Fix pinned param input border-radius to match pill shape from DOM
1 parent 52757d5 commit 7daff74

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/export/svg/renderer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,11 @@ function renderNode(node: NodeInstance, ctx: RenderContext): string {
251251
const inputW = inputRect.width / zoom;
252252
const inputH = inputRect.height / zoom;
253253
const inputValue = inputEl.value || inputEl.placeholder || '';
254+
const inputBorderRadius = parseFloat(getComputedStyle(inputEl).borderRadius) || inputH / 2;
254255

255-
// Input background
256+
// Input background (pill shape)
256257
parts.push(
257-
`<rect x="${inputX}" y="${inputY}" width="${inputW}" height="${inputH}" rx="4" fill="${ctx.theme.surfaceRaised}" stroke="${ctx.theme.border}" stroke-width="1"/>`
258+
`<rect x="${inputX}" y="${inputY}" width="${inputW}" height="${inputH}" rx="${inputBorderRadius}" fill="${ctx.theme.surfaceRaised}" stroke="${ctx.theme.border}" stroke-width="1"/>`
258259
);
259260

260261
// Input value

0 commit comments

Comments
 (0)