0

I have created the smart paypal button using the sdk in visualforce and I had no further complications using the script provided by paypal. Now I want to pass it to a lightning web components (LWC). The js has already been uploaded to static resources and the LWC already recognizes it in fact the paypal button already appears to me. But for some reason the smart paypal button inserts it from the left side of the screen as I read it is by default. I cannot modify it. and it's just a div that contains the paypal-button class. I do not know what else to do. I have used bootstrap and it does not work, I have used the slds and nothing. Apparently it ignores everything you put on it and always stays on the same side of the screen. I'm using a community builder to share my site in public. Could it be that LWC does not support it?

Link: https://developer.paypal.com/docs/checkout/integrate/#

1

LWC components enjoy CSS isolation via the Shadow DOM. This means that outside styles can't affect a component's inner elements except in defined ways specified by the developer of the component. You can either modify your component to allow positioning, or you can wrap that component inside another element to provide positioning (see, for example, this question).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.