如何在Semantic-UI中生成卡片之间的内部区域边框

时间:2017-02-13 01:41:09

标签: css reactjs semantic-ui

我正在使用Semantic-UI中的Card组件。我事先不知道要渲染多少张牌。我想在卡片的内侧面之间设置边框,类似于Grid中的边框。这是一种优雅的方式吗?

这是我的代码:

renderCategoryCards(){
  return this.props.grid.map((grid_cat) => {
    return ( <CategoryCard key={grid_cat._id} category={grid_cat}/> )
  })
}

render() {
  return (
    <div className="categories-wrapper">
      <Card.Group itemsPerRow={3} stackable>
          {this.renderCategoryCards()}
      </Card.Group>
    </div>
  );
}

1 个答案:

答案 0 :(得分:0)

render() { return ( <Grid className="categories-wrapper" celled='internally' container stackable centered columns='equal'> {this.generateRows()} </Grid> ); } }