improvement: Move inline styles to SCSS instead (#5578)
* fix: convert propStyle to propClass
This commit is contained in:
@@ -23,18 +23,18 @@ export default class FilterContainer extends React.Component {
|
||||
const isFailed = specSelectors.loadingStatus() === "failed"
|
||||
const filter = layoutSelectors.currentFilter()
|
||||
|
||||
const inputStyle = {}
|
||||
if (isFailed) inputStyle.color = "red"
|
||||
if (isLoading) inputStyle.color = "#aaa"
|
||||
const classNames = ["operation-filter-input"]
|
||||
if (isFailed) classNames.push("failed")
|
||||
if (isLoading) classNames.push("loading")
|
||||
|
||||
return (
|
||||
<div>
|
||||
{filter === null || filter === false ? null :
|
||||
<div className="filter-container">
|
||||
<Col className="filter wrapper" mobile={12}>
|
||||
<input className="operation-filter-input" placeholder="Filter by tag" type="text"
|
||||
<input className={classNames.join(" ")} placeholder="Filter by tag" type="text"
|
||||
onChange={this.onFilterChange} value={filter === true || filter === "true" ? "" : filter}
|
||||
disabled={isLoading} style={inputStyle}/>
|
||||
disabled={isLoading}/>
|
||||
</Col>
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user