@adyen/adyen-web
Version:
[](https://www.npmjs.com/package/@adyen/adyen-web)
3 lines (2 loc) • 1.33 kB
JavaScript
import{createElement as e}from"../../../../external/preact/dist/preact.js";import r from"../Field/Field.js";import n from"../Checkbox/Checkbox.js";function t(e,r){if(null==e)return{};var n,t,o,l={};if("undefined"!=typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(e),o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t]);return l}if(l=function(e,r){if(null==e)return{};var n,t,o={},l=Object.getOwnPropertyNames(e);for(t=0;t<l.length;t++)n=l[t],r.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,r),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t]);return l}function o(o){let{errorMessage:l,label:a,onChange:c,i18n:s}=o,i=t(o,["errorMessage","label","onChange","i18n"]);var f,p,b;return e(r,{classNameModifiers:["consentCheckbox"],errorMessage:l,i18n:s,name:"consentCheckbox",useLabelElement:!1},e(n,{name:"consentCheckbox",classNameModifiers:[...null!==(p=(f=i).classNameModifiers)&&void 0!==p?p:f.classNameModifiers=[],"consentCheckbox"],onInput:c,value:null==i||null===(b=i.data)||void 0===b?void 0:b.consentCheckbox,label:a,checked:i.checked}))}export{o as default};
//# sourceMappingURL=ConsentCheckbox.js.map