MCPcopy Create free account
hub / github.com/Lobos/react-ui / renderFiles

Method renderFiles

src/Upload.js:164–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

162 }
163
164 renderFiles () {
165 let files = this.state.files;
166 return Object.keys(files).map((id, i) => {
167 let file = this.state.files[id];
168 let className = classnames({
169 'uploaded': file.status === 2,
170 'has-error': file.status === 3
171 });
172 return (
173 <div key={i} className={className}>
174 <div className="rct-file">
175 <span>{file.name}</span>
176 <a className="remove" onClick={this.removeFile.bind(this, id)}>&times; {getLang('buttons.cancel')}</a>
177 </div>
178 <div ref={(c) => this.files[id] = c} className={'rct-upload-progress'}></div>
179 </div>
180 );
181 });
182 }
183
184 render () {

Callers 1

Upload.jsFile · 0.80

Calls 1

getLangFunction · 0.90

Tested by

no test coverage detected