This commit is contained in:
Jonathan Rainville 2018-10-24 16:03:40 -04:00
parent e268c5b8c8
commit d8145e80b1
1 changed files with 10 additions and 5 deletions

View File

@ -132,9 +132,14 @@ class TextEditor extends React.Component {
return ( return (
<ul className="list-inline m-0 p-2"> <ul className="list-inline m-0 p-2">
{this.props.editorTabs.map(file => ( {this.props.editorTabs.map(file => (
<li key={file.name} className={classNames("list-inline-item", "border-right", "p-2", { 'bg-dark': file.name === this.props.currentFile.name })}> <li key={file.name} className={classNames("list-inline-item")}>
<a className="text-white no-underline" href="#switch-tab" onClick={() => this.props.addEditorTabs(file)}>{file.name}</a> <a className={classNames({'text-body': file.name !== this.props.currentFile.name},
{'text-primary': file.name === this.props.currentFile.name}, "border-right", "p-2", "d-inline-block")}
href="#switch-tab" onClick={() => this.props.addEditorTabs(file)}>
{file.name}
<FontAwesomeIcon onClick={() => this.props.removeEditorTabs(file)} className="mx-1" name="close"/> <FontAwesomeIcon onClick={() => this.props.removeEditorTabs(file)} className="mx-1" name="close"/>
</a>
</li> </li>
))} ))}
</ul> </ul>