mirror of
https://github.com/documenso/documenso.git
synced 2026-07-24 00:43:40 +10:00
refactor: extract common components into UI package
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
export const getBoundingClientRect = (element: HTMLElement) => {
|
||||
const rect = element.getBoundingClientRect();
|
||||
|
||||
const { width, height } = rect;
|
||||
|
||||
const top = rect.top + window.scrollY;
|
||||
const left = rect.left + window.scrollX;
|
||||
|
||||
return { top, left, width, height };
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
export const PDF_VIEWER_CONTAINER_SELECTOR = '.react-pdf__Document';
|
||||
export const PDF_VIEWER_PAGE_SELECTOR = '.react-pdf__Page';
|
||||
Reference in New Issue
Block a user