我需要在我的IconButton of material ui之前添加自定义文本。下面是按钮的代码
<div className={classes.toolbar}>
<IconButton onClick={handleDrawerClose}>
{theme.direction === 'rtl' ? <ChevronRightIcon /> : <ChevronLeftIcon />}
</IconButton>
</div>如何在图标前添加文本?
发布于 2019-09-05 21:19:37
您可以使用Button组件并相应地设置其样式
<Button
variant="contained"
color="secondary"
className={classes.button}
>
My Button Text
{
theme.direction === 'rtl'
? <ChevronRightIcon />
: <ChevronLeftIcon />
}
</Button>https://stackoverflow.com/questions/57803482
复制相似问题