如何在 Material UI 中将按钮附加到 TextField

How to append a button to TextField in Material UI

如何像 bootstrap 输入组那样将按钮附加到 TextField?

我试过了,但是太丑了:

<TextField fullWidth
            variant="outlined"
            label="Add Something"
            InputProps={
                {
                    endAdornment: (
                        <InputAdornment position="end">
                            <Button
                                aria-label="Add"
                                edge="end"
                                color="primary"
                                variant="contained"
                            >
                                ADD
                            </Button>
                        </InputAdornment>
                    )
                }
            }
/>
<FormGroup row>
  <TextField variant="outlined" placeholder="username" />
  <Button variant="contained" disableElevation>
    @example.com
  </Button>
</FormGroup>