make input fixed position reactjs code example
Example: make input fixed position reactjs
<div style={{display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
<h1>Do Not Move Me</h1>
<div style={{ position: 'relative', marginLeft: 20 }}>
<input
placeholder='Enter Name'
onChange={this._displayButton}
value={this.state.nameText}
/>
{this.state.textEntered ?
<button type="submit" style={{ position: 'absolute', top: '-10px', right: '-10px', borderRadius: '50%', height: 40, width: 40, backgroundColor: '#881587', border: 'none' }} /> : null
}
</div>
</div>