I have been working on this code snippet to center a button both vertically and horizontally. However, it seems like the button is not positioned correctly along the vertical axis. Any advice or guidance would be greatly appreciated!
Could someone assist me in troubleshooting this issue?
import React from 'react';
import Button from '@material-ui/core/Button';
import Grid from '@material-ui/core/Grid';
function App() {
return (
<Grid container direction="row" justify="center" alignItems="center" justifyContent="center">
<Grid item>
<Button variant="contained" color="primary">Hello</Button>
</Grid>
</Grid>
);
}
export default App;