Add a complete example of the styles object schema that can be passed to the Card component constructor #16
Replies: 2 comments
-
@rossparachute a small update, we are still looking at this. |
Beta Was this translation helpful? Give feedback.
-
@rossparachute - if you could look at the documenation for the card component: https://docs.dojo.tech/payments/accept-payments/components/configuration. You could see that these config settings are not supported: So in order to submit billing or shipping address, you would need to render the fields yourself and submit the data it via the https://docs.dojo.tech/payments/accept-payments/components/configuration#additional-information. Now, the
|
Beta Was this translation helpful? Give feedback.
-
Hey @JoshTQ @taurelius-dojo,
Hope you're both well!
Do you have any example styles for the billing address fields?
Expected Behaviour
Docs with a more complete representation of the accepted styles schema for the Card component.
Actual Behaviour
Example styles in the repo only partially represent the accepted shape of the styles object. The additional billing/shipping address fields don't appear to be covered. The stylesConfig anchor link on the configuration doc doesn't appear to navigate to a complete example styles object.
https://docs.dojo.tech/payments/accept-payments/components/configuration#styles-config
Proposed Solution
A more complete use-case in the examples repo showing the full expected shape of the styles object. Typescript interfaces for this object is a nice-to-have.
Additional Info
By address fields we mean, the input fields added when the Card component config has the billingAddressRequired and shippingAddressRequired flags set to true.
Think there's meant to be a description of it in the docs:
https://docs.dojo.tech/payments/accept-payments/components/configuration#styles-config
Currently we base the DefaultStyles object that gets passed to the new Dojo.Payment() constructor args off of:
https://github.com/dojo-engineering/dojo-samples/tree/main/samples/accept-a-payment/prebuilt-checkout/client/react-cra/src/styles
Adding in the following lets us style the billing address title but targeting the inner fields doesn't seem to follow the container/default shape the other styles use. Just need the expected object shape and we'll style the rest.
Thanks for your efforts,
Ross
Full styles and example usage:
Beta Was this translation helpful? Give feedback.
All reactions