MCPcopy Index your code
hub / github.com/react-bootstrap/react-bootstrap / updateDialogStyle

Function updateDialogStyle

src/Modal.tsx:300–319  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

298 }
299
300 function updateDialogStyle(node) {
301 if (!canUseDOM) return;
302
303 const containerIsOverflowing =
304 getModalManager().getScrollbarWidth() > 0;
305
306 const modalIsOverflowing =
307 node.scrollHeight > ownerDocument(node).documentElement.clientHeight;
308
309 setStyle({
310 paddingRight:
311 containerIsOverflowing && !modalIsOverflowing
312 ? getScrollbarSize()
313 : undefined,
314 paddingLeft:
315 !containerIsOverflowing && modalIsOverflowing
316 ? getScrollbarSize()
317 : undefined,
318 });
319 }
320
321 const handleWindowResize = useEventCallback(() => {
322 if (modal) {

Callers 2

Modal.tsxFile · 0.85
handleEnterFunction · 0.85

Calls 1

getModalManagerFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…