Here's my advancedsearchfiles.css
.AdvancedSearchGrid {
width: 70%;
margin: auto;
list-style: none;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
justify-content: space-around;
}
.AdvancedSearchField {
padding: none;
width: 320px;
height: 20px;
line-height: 20px;
text-align: left;
border: none;
box-shadow: none;
}
Here's my ReactJS class where I import it and use it:
import React, {Component} from 'react';
//...other imports...
import './styles/advancedsearchfields.css';
// irrelevant stuff
<div className="AdvancedSearchGrid">
<TextField className="AdvancedSearchField" name="firstName" value=
{this.state.firstName} onChange={this.handleChange.bind(this)}
floatingLabelText="Firstname" inputStyle={{boxShadow: 'none'}}
floatingLabelFocusStyle={{color: '#4e90c8'}} underlineFocusStyle=
{{backgroundColor: '#4e90c8', height: '2px'}}/>
</div>
When building the project now I get the error:
events.js:160
throw er; // Unhandled 'error' event
SyntaxError: Unexpected token
If I remove the import of the css file, this error doesn't occur. Removing any of the other related code doesn't remove the error, so it is definitely the import of the css that causes it.
What am I doing wrong? I was following a tutorial that did it like this.