[英]How to style the react-stripe-checkout form?
我想知道如何將自定義樣式添加到 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.