We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently propTypes only allows a string for the ComponentClass prop:
propTypes
ComponentClass
react-stripe-checkout/StripeCheckout.js
Line 46 in c351801
It should be able to accept an actual component class (or function), to avoid the extra span DOM node:
span
import StripeCheckout from 'react-stripe-checkout' const Button = ({ children, ...props }) => ( <button {...props}>{children}</button> ) class TakeMoney extends Component { onToken = token => console.log(token) render() { return ( <StripeCheckout stripeKey={process.env.STRIPE_KEY} token={this.onToken} ComponentClass={Button} > New payment source </StripeCheckout> ) } }
The above works, but triggers a propTypes warning in a dev environment.
The text was updated successfully, but these errors were encountered:
What about this issue?
Sorry, something went wrong.
Any progress on this?
No branches or pull requests
Currently
propTypes
only allows a string for theComponentClass
prop:react-stripe-checkout/StripeCheckout.js
Line 46 in c351801
It should be able to accept an actual component class (or function), to avoid the extra
span
DOM node:The above works, but triggers a
propTypes
warning in a dev environment.The text was updated successfully, but these errors were encountered: