As a beginner in the world of React and Material UI, I am currently working with Material UI version "1.0.0-beta.17", React 15.6.2, styled-components 2.0.0, and styled-components-breakpoint 1.0.1.
Within a div element, I have two TextInput fields.
const mycomponent = ({props}) => {
<div>
<SomeComponent />
<div>
<TextInput id="testId1" />
<TextInput id="testId2" />
</div>
</div>
}
Upon rendering, an additional parent div is added to each input field like this:
<div>
<div class="field--testId1">
<div class="FormItem__ElementWrapper-s14tem39-3 bgVlIQ">
<input id="testId1">
</div>
</div>
<div class="field--testId2">
<div class="FormItem__ElementWrapper-s14tem39-3 bgVlIQ">
<input id="testId2">
</div>
</div>
</div>
I am now wondering how I can target these divs to apply styles using the class names field--testId1 and field--testId2. These class names are generated by default in Material UI.
.field--testId1{
width: "48%",
float: "left"
}
.field--testId2{
width: "48%",
float: "left"
}
Any assistance on how to achieve this in React and Material UI would be greatly appreciated.