Closed agrohs closed 5 years ago
import images from 'react-payment-inputs/lib/images';
then
<PaymentInputsContainer>
{({
meta,
getCardNumberProps,
getExpiryDateProps,
getCVCProps,
getCardImageProps
}) => (
<div>
<svg {...getCardImageProps({ images })} />
@jxom
Should be fixed in 1.0.6
Not sure if we're doing something wrong here and/or need to do an additional yarn install, but when trying to use the PaymentInputsWrapper, we are having an issue w/ basic import of the credit card images:
import images from 'react-payment-inputs/images';
.It gives us an error of:
Looked inside of the installed node_modules directory and see the
react-payment-inputs/es (and /lib and /umd)
folders - with the /es and /lib ones each containing the subfolder for images but not sure how they are exported in there via rollup such that the images can be imported properly??Any idea on what we're doing wrong?
Do we need to explicitly import the es6 version? (
import images from 'react-payment-inputs/es/images';
)