[英]How to style the react-stripe-checkout form?
I would like to know how to add custom styling to the react-stripe-checkout form component.我想知道如何将自定义样式添加到 react-stripe-checkout 表单组件。 (ex: Change the background color, etc.) (例如:更改背景颜色等)
https://www.npmjs.com/package/react-stripe-checkout https://www.npmjs.com/package/react-stripe-checkout
here is an example.这是一个例子。 I believe it is very clear.我相信这是很清楚的。 I use materialize css here but you can style it the way you want it.我在这里使用了 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.