Reputation: 1638
How can I append a button to a TextField like in bootstrap input group?
I tried this, but it is too ugly:
<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>
)
}
}
/>
Upvotes: 4
Views: 9011
Reputation: 1546
<FormGroup row>
<TextField variant="outlined" placeholder="username" />
<Button variant="contained" disableElevation>
@example.com
</Button>
</FormGroup>
Upvotes: 14