UNPKG

@compdfkit_pdf_sdk/react_native

Version:

ComPDFKit for React Native is a comprehensive SDK that allows you to quickly add PDF functionality to Android, iOS, and React Native applications.

42 lines (40 loc) 1.81 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CPDFPushbuttonWidget = void 0; var _CPDFAction = require("../../document/action/CPDFAction"); var _CPDFWidget = require("./CPDFWidget"); /** * Copyright © 2014-2025 PDF Technologies, Inc. All Rights Reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT. * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES. * This notice may not be removed from this file. */ /** * A class representing a push button form widget, storing basic information about the button form. * * @class CPDFPushbuttonWidget * @memberof CPDFpushbuttonWidget * @property {string} buttonTitle - The title of the push button form widget. * @property {CPDFAction | null} action - The action associated with the push button (default: null). * @property {string} fontColor - The font color of the push button (default: '#000000'). * @property {number} fontSize - The font size of the push button (default: 0). * @property {string} fontName - The font name of the push button (default: empty string). */ class CPDFPushbuttonWidget extends _CPDFWidget.CPDFWidget { action = null; constructor(viewerRef, params) { super(viewerRef, params); this.buttonTitle = params.buttonTitle ?? ""; this.action = _CPDFAction.CPDFAction.fromJson(params.action ?? {}); this.fontColor = params.fontColor ?? "#000000"; this.fontSize = params.fontSize ?? 0; this.familyName = params.familyName ?? ""; this.styleName = params.styleName ?? ""; } } exports.CPDFPushbuttonWidget = CPDFPushbuttonWidget; //# sourceMappingURL=CPDFPushbuttonWidget.js.map