【问题标题】:How to give border styles to Material UI TableRow Component?如何为 Material UI TableRow 组件赋予边框样式?
【发布时间】:2021-02-22 05:25:43
【问题描述】:

我在我的项目中使用 Material UI Table 组件。我想为 TableRow 组件提供边框样式。我正在使用 scss classNames 为组件提供样式。通常边框样式在 TableCell 中处理,但它不符合我的要求。有什么办法可以为 TableRow 提供边框样式?

TableRow API - https://material-ui.com/api/table-row/#css

我已经做了一个 Codesandbox 实现here

【问题讨论】:

    标签: css reactjs material-ui


    【解决方案1】:

    您只需要删除TableCells 的底部边框

    将此 CSS 规则添加到 demo.scss

    .MuiTableCell-root {
      border-bottom: none;
    }
    

    【讨论】:

      猜你喜欢
      • 2018-03-24
      • 1970-01-01
      • 2021-07-20
      • 2022-01-24
      • 1970-01-01
      • 2012-11-09
      • 1970-01-01
      • 1970-01-01
      • 2020-04-16
      相关资源
      最近更新 更多