Skip to content

Commit 2c8a1a5

Browse files
chrisgervangclaude
andcommitted
fix(widgets): Improve GeocoderWidget error styling and enable geolocation in example
- Style error message as themed popup below widget instead of breaking layout - Enable geolocation option in widgets example Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b7d97df commit 2c8a1a5

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

examples/get-started/pure-js/widgets/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ new Deck({
7979
new ZoomWidget({style: widgetTheme}),
8080
new CompassWidget({style: widgetTheme}),
8181
new FullscreenWidget({style: widgetTheme}),
82-
new GeocoderWidget({style: widgetTheme})
82+
new GeocoderWidget({style: widgetTheme, _geolocation: true})
8383
]
8484
});

modules/widgets/src/stylesheet.css

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,20 @@
304304
}
305305

306306
.deck-widget .deck-widget-geocoder-error {
307-
width: 100%;
308-
padding: 4px 8px;
309-
color: rgb(220, 53, 69);
310-
font-size: 0.875em;
307+
position: absolute;
308+
top: calc(100% + var(--menu-gap, 4px));
309+
left: 1px;
310+
right: 1px;
311+
padding: 6px 10px;
312+
background: var(--button-background, #fff);
313+
backdrop-filter: var(--button-backdrop-filter, unset);
314+
border: var(--button-inner-stroke, unset);
315+
border-radius: var(--button-corner-radius, 8px);
316+
box-shadow: var(--button-shadow, 0px 0px 8px 0px rgba(0, 0, 0, 0.25));
317+
color: rgb(220, 80, 80);
318+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
319+
font-size: 12px;
320+
text-align: center;
311321
}
312322

313323
/* When dropdown is not present, input should have full rounded corners */

0 commit comments

Comments
 (0)