react-images-upload icon indicating copy to clipboard operation
react-images-upload copied to clipboard

Choose Button Class does not override

Open abhiburk opened this issue 6 years ago • 0 comments

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

abhiburk avatar Dec 05 '19 18:12 abhiburk