UNPKG

@mopinion/survey

Version:

Collect customer feedback with the Mopinion survey library

27 lines (26 loc) 1.41 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = HiddenLabel; var _preact = require("preact"); var style = { height: 0, width: 0, fontSize: 0, margin: 0, opacity: 0 }; function HiddenLabel(_ref) { var _block$properties$ele, _block$properties, _block$properties2; var labelFor = _ref.labelFor, _ref$block = _ref.block, block = _ref$block === void 0 ? {} : _ref$block; var ariaLabel = ['radio', 'checkbox', 'select'].indexOf(block.typeName) > -1 ? (_block$properties$ele = block === null || block === void 0 || (_block$properties = block.properties) === null || _block$properties === void 0 || (_block$properties = _block$properties.elements_extra) === null || _block$properties === void 0 || (_block$properties = _block$properties[1]) === null || _block$properties === void 0 ? void 0 : _block$properties.placeholder) !== null && _block$properties$ele !== void 0 ? _block$properties$ele : 'please specify' : (block === null || block === void 0 ? void 0 : block.typeName) === 'contact' ? block === null || block === void 0 ? void 0 : block.placeholder : 'input field'; return (0, _preact.h)("label", { style: style, "for": labelFor, ariaLabel: ariaLabel }, (_block$properties2 = block.properties) === null || _block$properties2 === void 0 ? void 0 : _block$properties2.placeholder); } //# sourceMappingURL=HiddenLabel.js.map