Can anyone help me figure out how to hide the border behind the title text in an outlined textfield from Material-UI that I am trying to imitate?
In the image below, you can see "Due Date/Time" taken from Material-UI library where the title hides the border behind it. However, my custom component is struggling to achieve this effect.
Is there a more effective way to implement this outline design rather than just using CSS?
This is how my current component is structured:
<div style={inputContainerStyle}>
<div style={{
...titleStyle,
transform: 'translate(-43px, -11px) scale(0.75)',
fontSize: '17px',
color: 'rgba(0, 0, 0, 0.54)',
position: 'absolute',
}}
>
Color
</div>
<div
className="flex-row"
style={{
border: '1px solid rgba(0, 0, 0, 0.23)',
padding: '18.5px 14px',
borderRadius: '4px',
}}
>
{
availableColors.map(color => <div style={colorCircleStyle(color)} />)
}
</div>
</div>