UNPKG

@open-tender/store

Version:

A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API

24 lines (23 loc) 904 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var hooks_1 = require("../app/hooks"); var slices_1 = require("../slices"); var InputButton = function (_a) { var label = _a.label, value = _a.value, open = _a.open, isRequired = _a.isRequired, style = _a.style, labelStyle = _a.labelStyle, showOptionalLabel = _a.showOptionalLabel, children = _a.children; var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _b.inputButton, labelConfig = _b.label; var handlers = { open: open }; if (!config) return null; return children({ config: config, labelConfig: labelConfig, handlers: handlers, label: label, value: value, isRequired: isRequired, style: style, labelStyle: labelStyle, showOptionalLabel: showOptionalLabel }); }; exports.default = InputButton;