Positioning a Material UI button to the rightmost of row

Trying to align this React material-ui button to the right-most of the page and can’t seem to get this working:

    <Grid item justify="flex-end">
      <Button              
        variant="contained"
        color="primary"
        onClick={() => myFunction()}
      >
        Submit
      </Button>
    </Grid>

Have tried justify="flex-end" but doesn’t seem to be working.

Answer

I think justify= goes on the container instead of the item, like this:

<Grid container justify="flex-end">
  <Grid item>
    <Button              
      variant="contained"
      color="primary"
      onClick={() => myFunction()}
    >
      Submit
    </Button>
  </Grid>
</Grid>