mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
work and created develop branch
This commit is contained in:
3
Example Code/CardList/index.css
Normal file
3
Example Code/CardList/index.css
Normal file
@@ -0,0 +1,3 @@
|
||||
.cardList {
|
||||
|
||||
}
|
||||
38
Example Code/CardList/index.js
Normal file
38
Example Code/CardList/index.js
Normal file
@@ -0,0 +1,38 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import Card from "../Card/";
|
||||
import data from "../../data.json";
|
||||
|
||||
class CardList extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { cards: data.cards };
|
||||
}
|
||||
|
||||
remove() {
|
||||
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
{
|
||||
this.state.cards.map((card, index) => {
|
||||
return <Card
|
||||
key={index}
|
||||
title={card.title}
|
||||
content={card.content}
|
||||
dataclick={this.remove}
|
||||
/>
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
export default CardList;
|
||||
|
||||
Reference in New Issue
Block a user