From b36d3caa8285288ed45cd2dafca8a51dd4f1048b Mon Sep 17 00:00:00 2001 From: Antoine <antoine.roy@tetras-libre.fr> Date: Fri, 8 Dec 2023 16:16:01 +0100 Subject: [PATCH] textAlign center on Time Input --- src/HMSInput.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/HMSInput.js b/src/HMSInput.js index 7a1be4a..06d7d46 100644 --- a/src/HMSInput.js +++ b/src/HMSInput.js @@ -57,9 +57,10 @@ class HMSInput extends Component { name="hours" value={hours} onChange={this.someChange} + inputProps={{ style: {textAlign: 'center'} }} /> - <Input className={classes.input} type="number" min="0" max="59" name="minutes" value={minutes} onChange={this.someChange} /> - <Input className={classes.input} type="number" min="0" max="59" name="seconds" value={seconds} onChange={this.someChange} /> + <Input className={classes.input} type="number" min="0" max="59" name="minutes" value={minutes} onChange={this.someChange} inputProps={{ style: {textAlign: 'center'} }}/> + <Input className={classes.input} type="number" min="0" max="59" name="seconds" value={seconds} onChange={this.someChange} inputProps={{ style: {textAlign: 'center'} }}/> </div> </div> ); @@ -71,7 +72,6 @@ const styles = (theme) => ({ root: { alignItems: 'center', display: 'flex', - justifyContent: 'end', }, // eslint-disable-next-line sort-keys flexcol: { @@ -83,8 +83,6 @@ const styles = (theme) => ({ input: { height: 'fit-content', margin: '2px', - textAlign: 'center', - width: '4ch', // remove arrow from field for Firefox '& input[type=number]': { '-moz-appearance': 'textfield', -- GitLab