【问题标题】:Stripe and React, react-stripe-element custom card element without zip fieldStripe 和 React,react-stripe-element 自定义卡片元素,没有 zip 字段
【发布时间】:2020-06-03 10:20:23
【问题描述】:

我是新手并做出反应。

我正在尝试创建一个已经设计好的条纹结帐屏幕。

现在,当我添加 CardElement 组件时,它会创建一个如下所示的新行

我希望它使用我自己的自定义样式元素,有没有办法将这些作为自定义样式的道具传递给它们

问候

【问题讨论】:

  • 你有解决方案吗,请告诉我我也遇到了同样的问题

标签: javascript reactjs stripe-payments


【解决方案1】:

关于样式化条纹卡片元素的主题。我建议查看 Stripe.js 文档的以下部分:

  1. https://stripe.com/docs/js/element/the_element_container
  2. https://stripe.com/docs/js/appendix/style
  3. https://stripe.com/docs/js/elements_object/create_element?type=card

最终,您可以使用 classesstyle 参数来更改卡片元素的样式。

希望这会有所帮助!

【讨论】:

    猜你喜欢
    • 2020-11-16
    • 2018-08-20
    • 2022-06-10
    • 2021-03-07
    • 2018-05-23
    • 2019-12-28
    • 2017-11-04
    • 2020-04-18
    • 2020-04-18
    相关资源
    最近更新 更多