Closed toksdotdev closed 6 years ago
@TNkemdilim Good point. you PR is always welcome.
Hey @TNkemdilim. Thanks for this idea. It has been implemented with this commit https://github.com/iamraphson/vue-paystack/commit/e42c57c0e58b0a21dc8a3c2deee2c911528dd4c5
A user should be allowed to include custom html elements into the button, e.g. a glyphicon etc.
A solution: is to use the
<slot> ... </slot>
available in VueJS as follows:Although this would mean two things:
To support backward compatibilty, props
text
can still remain, but users will have to pass in an empty string to it (Although, notice: if a user doesn't, it will use the default string you set which is Make Payment. This can then conflict somehow with the html a user might include inside the button)We can completely remove out the
text
props, and allow users to add any text to the button by including whatever html they want into the paystack button. e.g.This can work using the solution I proferred above.
Based on what you decide, I could submit a PR implementing this small change.