button - 如何在 Material UI 快速拨号按钮中添加文本?
问题描述
如何更改材质ui快速拨号按钮,显然它使用Fab默认值,您所能做的就是更改Icon,但我还需要添加一个文本,例如:
<Fab variant="extended">
<NavigationIcon />
Actions
</Fab>
解决方案
- 用于
SpeedDialAction
此目的
<SpeedDialAction
key={action.name}
icon={action.icon} // here goes your icon
tooltipTitle={action.name} // here goes your text
tooltipOpen
onClick={handleClose}
/>
- 或根据您的目的使用浮动操作按钮
<Fab
aria-label={fab.label}
className={fab.className}
color={fab.color}
>
{fab.icon}
</Fab>
请让我知道它是否适合您)
推荐阅读
- node.js - 将 Express Js 启动文件拆分为模块
- ansible - Ansible 无法根据 stdout_lines 列表上的字符串搜索使任务失败
- mysql - 如何导出 Postgresql 数据库,以便在 MySQL 中使用?
- html - WordPress style.css 中的预期 RBRACE 错误
- docker - Docker Compose - getaddrinfo 失败:名称或服务未知
- ruby-on-rails - How to reduce select commands in a Simple one table query. Rails
- spring-boot - jsf primefaces和Spring Boot项目组件注入问题
- jquery - 在文本输入上使用 jquery 进行 contenteditable 并包含特定文本显示 div
- python - 在没有 Pandas 的情况下清理 CSV 中的数据
- python - 存储包含数据帧的字典的最有效方法