UNPKG

jb-payment-input

Version:
2 lines 546 B
import r,{useEffect as e,useImperativeHandle as t,useRef as a,useState as i}from"react";import"jb-payment-input/bank-indicator";let n=r.forwardRef((n,p)=>{let c=a(null),[o,f]=i(0);return t(p,()=>c?c.current:{},[c]),e(()=>{f(o+1)},[c.current]),e(()=>{n.prefix&&"string"==typeof n.prefix&&""!==n.prefix&&c.current?.setAttribute("prefix",n.prefix)},[n.prefix]),r.createElement("bank-indicator",{ref:c,class:n.className?n.className:"",slot:n.slot})});n.displayName="BankIndicator";export{n as BankIndicator}; //# sourceMappingURL=BankIndicator.js.map