medipass/react-payment-inputs

Can't use without styled-components

Opened this issue ยท 5 comments

Even though I am using only usePaymentInputs, I can't seem to use it without needing to install styled-components.

Module not found: Can't resolve 'styled-components' in '/home/romaia/dev/stoq/contactless-payment/node_modules/react-payment-inputs/es'

I'm having the same issue

Same here

same issue

@romaia Maybe you're importing usePaymentInputs() like this:

import { usePaymentInputs } from 'react-payment-inputs';

if so, then for me the following import worked:

import usePaymentInputs from 'react-payment-inputs/es/usePaymentInputs';

same here