【问题标题】:How can I create a bulleted list using Material UI components?如何使用 Material UI 组件创建项目符号列表?
【发布时间】:2022-07-27 19:29:37
【问题描述】:

如何使用 MUI 组件创建项目符号列表?我尝试将 sx={{listStyleType:'disc'}} 添加到 List 组件,但没有运气。这是我的代码:

    <List sx={{ listStyleType: 'disc' }}>
      <ListSubheader sx={{
        fontWeight: 700, lineHeight: '24px', fontSize: '16px', color: 'black'
      }}
      >
        Search Help
      </ListSubheader>
      <ListItem>Double check your spelling</ListItem>
      <ListItem>Your search may have been removed or is not yet in the system</ListItem>
    </List>

【问题讨论】:

  • 你能发布你的完整代码吗?

标签: material-ui


【解决方案1】:

我想通了,应该是&lt;ListItem sx={{ display: 'list-item' }}&gt;

【讨论】:

    【解决方案2】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-09
      • 2022-12-15
      相关资源
      最近更新 更多