How to put an icon in the corner of a Material UI button in react?
Now what I have is this, where the icon is right next to the title. I wish to move the icon to the lower right corner of the button... Any idea how to achieve this? Thanks!
export default function CardButton() {
return (
<Button
variant="contained"
style={{
height: 220,
width: 275,
margin: '1vh',
}}
color="secondary"
>
<Typography variant="button" style={{fontSize:'24px'}}>title</Typography>
<AddIcon/>
</Button>
)
}
Use position: absolute
to position the icon.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.