@primer/react 0.0.0-20260409134133 → 0.0.0-20260409150655
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -241,7 +241,8 @@ function getDefaultPosition(anchorElement, overlayWidth) {
|
|
|
241
241
|
const vw = window.innerWidth;
|
|
242
242
|
if (!overlayWidth || rect.left >= overlayWidth) return null;
|
|
243
243
|
const horizontal = vw - rect.right >= rect.left ? 'right' : 'left';
|
|
244
|
-
const
|
|
244
|
+
const viewportMargin = 8;
|
|
245
|
+
const offset = Math.max(0, overlayWidth - rect.right + viewportMargin);
|
|
245
246
|
return {
|
|
246
247
|
horizontal,
|
|
247
248
|
offset
|
package/package.json
CHANGED