繁体   English   中英

如何设置 react-stripe-checkout 表单的样式?

[英]How to style the react-stripe-checkout form?

我想知道如何将自定义样式添加到 react-stripe-checkout 表单组件。 (例如:更改背景颜色等)

https://www.npmjs.com/package/react-stripe-checkout

这是一个例子。 我相信这是很清楚的。 我在这里使用了 materialize css,但你可以按照你想要的方式设计它。

import StripeCheckout from "react-stripe-checkout";

class Payments extends Component {
  render() {
    return (
      <div>
        <StripeCheckout
          name="survey"
          description="survey credits"
          amount={500}
          token={token => this.props.handleToken(token)}
          stripeKey={process.env.REACT_APP_STRIPE_KEY}
        >
          <button className="btn">Add Credits</button>
        </StripeCheckout>
      </div>
    );
  }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM