【问题标题】:How to add a text into Material UI speed dial button?如何在 Material UI 快速拨号按钮中添加文本?
【发布时间】:2021-08-24 05:37:10
【问题描述】:

如何更改材质ui快速拨号按钮,显然它使用了Fab默认,你所能做的就是更改图标,但我还需要添加一个文本,例如:

<Fab variant="extended">
    <NavigationIcon />
    Actions
</Fab>

【问题讨论】:

    标签: button material-ui frontend customization speed-dial


    【解决方案1】:
    1. 为此目的使用SpeedDialAction
        <SpeedDialAction
           key={action.name}
           icon={action.icon} // here goes your icon
           tooltipTitle={action.name} // here goes your text
           tooltipOpen
           onClick={handleClose}
        />
    

    悬停时您会看到

    1. 或使用floating action button 来满足您的目的
        <Fab
            aria-label={fab.label}
            className={fab.className}
            color={fab.color}
        >
            {fab.icon}
        </Fab>
    


    请让我知道它是否适合您)

    【讨论】:

    • 这不是他要找的,似乎他想在打开拨号操作之前获得一些主要文本,我现在正在尝试做同样的事情
    猜你喜欢
    • 2020-05-07
    • 2022-08-19
    • 1970-01-01
    • 1970-01-01
    • 2018-07-14
    • 1970-01-01
    • 2021-10-24
    • 1970-01-01
    • 2019-11-14
    相关资源
    最近更新 更多