react-images-upload
react-images-upload copied to clipboard
Choose Button Class does not override
I tried using buttonClassName="btn btn-sm btn-primary" but it seems the bootstrap property is not applied to the button and chooseFileButton is the class which is applied.
So after looking into the package in index.js render method I found a solution to do it
const defaultButton = this.props.defaultButton? " " :null; //new line
return (
<div className={"fileUploader " + this.props.className} style={this.props.style}>
<div className="fileContainer" style={this.props.fileContainerStyle}>
{this.renderIcon()}
{this.renderLabel()}
<div className="errorsContainer">
{this.renderErrors()}
</div>
<button
type={this.props.buttonType}
className={ defaultButtonClass +' '+ this.props.buttonClassName}
Doing this will help to override the default class chooseFileButton property