UNPKG

@progress/kendo-react-pdf

Version:

React PDF Processing enables you to export single- and multi-page content in PDF. KendoReact PDF Processing package

26 lines (25 loc) 812 B
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as a from "react"; import { PDFMargin as f } from "./PDFMargin.mjs"; const i = ["bottom", "left", "right", "top"]; function s(r) { const n = a.Children.toArray(r.children).find((t) => t && t.type === f); return n ? g(n) : r.margin; } function g(r) { const n = {}; for (let t = 0; t < i.length; t++) { const o = i[t], e = r.props[o]; e !== void 0 && (n[o] = e); } return n; } export { s as getPageMargin };