Skip to content

Commit 46b7a40

Browse files
committed
.
1 parent 6be400e commit 46b7a40

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/components/primitives/Light.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ function Light({
1111
}: LightProps) {
1212
// Calculate scaled dimensions based on size (default 40px)
1313
// Special case for debug lights (size ~44): 8px shadow, 24px bulb
14-
// For sizes <= 30: use 0.1 ratio, for size 40: use 0.25 ratio
15-
const shadowOffset = size > 42 ? 8 : (size <= 30 ? size * 0.1 : size * 0.25); // 8px for size 44, 3px for size 30, 10px for size 40
14+
// For sizes <= 30: use 0.1 ratio, for size 40: use custom values
15+
const shadowOffsetTop = size > 42 ? 8 : (size <= 30 ? size * 0.1 : 9); // 8px for size 44, 3px for size 30, 9px for size 40
16+
const shadowOffsetLeft = size > 42 ? 8 : (size <= 30 ? size * 0.1 : 8); // 8px for size 44, 3px for size 30, 8px for size 40
1617
const bulbOffset = size > 42 ? 8 : (size <= 30 ? size * 0.1 : size * 0.25); // 8px for size 44, 3px for size 30, 10px for size 40
1718
const innerRingSize = size > 42 ? 28 : size * 0.65; // 28px for size 44, 26px for size 40, 19.5px for size 30
1819
const bulbSize = size > 42 ? 24 : size * 0.55; // 24px for size 44, 22px for size 40, 16.5px for size 30
@@ -47,8 +48,8 @@ function Light({
4748
<div
4849
className="absolute rounded-full"
4950
style={{
50-
top: `${shadowOffset}px`,
51-
left: `${shadowOffset}px`,
51+
top: `${shadowOffsetTop}px`,
52+
left: `${shadowOffsetLeft}px`,
5253
width: `${innerRingSize}px`,
5354
height: `${innerRingSize}px`,
5455
background: '#0d0f13',

0 commit comments

Comments
 (0)