Skip to content

Commit 3282a1d

Browse files
committed
custom rectangle outline colour
1 parent dc273c3 commit 3282a1d

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

packages/feedback/src/screenshot/components/ScreenshotEditorv2.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,14 @@ function drawRect(rect: Rect, ctx: CanvasRenderingContext2D, scale: number = 1,
9494
ctx.shadowColor = 'transparent';
9595
ctx.shadowBlur = 0;
9696

97-
ctx.strokeStyle = '#ff0000';
97+
let strokeColor;
98+
const sentryFeedback = DOCUMENT.getElementById('sentry-feedback');
99+
if (sentryFeedback) {
100+
strokeColor =
101+
getComputedStyle(sentryFeedback).getPropertyValue('--button-primary-background') ||
102+
getComputedStyle(sentryFeedback).getPropertyValue('--accent-background');
103+
}
104+
ctx.strokeStyle = strokeColor || 'white';
98105
ctx.lineWidth = lineWidth;
99106
ctx.strokeRect(scaledX + 1, scaledY + 1, scaledWidth - 2, scaledHeight - 2);
100107
}

packages/feedback/src/screenshot/components/ScreenshotInput.css.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ export function createScreenshotInputStyles(styleNonce?: string): HTMLStyleEleme
132132
border: var(--button-border, var(--border));
133133
border-radius: var(--button-border-radius, 6px);
134134
background: var(--button-background, var(--background));
135-
color: var(--button-foreground, var(--foreground));
135+
color: var(--button-color, var(--foreground));
136136
}
137137
138138
.editor__tool--active {
139139
background: var(--button-primary-background, var(--accent-background));
140-
color: var(--button-primary-foreground, var(--accent-foreground));
140+
color: var(--button-primary-color, var(--accent-foreground));
141141
}
142142
143143
.editor__rect-container {

0 commit comments

Comments
 (0)