Skip to content
This repository has been archived by the owner on Oct 8, 2018. It is now read-only.

Add support for user-land classname prop #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ReactFileReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,13 @@ export default class ReactFileReader extends React.Component {
position: 'fixed',
}

var classNames = ['react-file-reader'];
if(this.props.className){
classNames.push(this.props.className);
}

return(
<div className='react-file-reader'>
<div className={classNames.join(' ')}>
<input type='file'
onChange={this.handleFiles}
accept={Array.isArray(this.props.fileTypes) ? this.props.fileTypes.join(',') : this.props.fileTypes}
Expand Down