Skip to content

Instantly share code, notes, and snippets.

@garima33
Last active November 19, 2019 10:46
Show Gist options
  • Select an option

  • Save garima33/27d95f91c6844f424f0d2d1781189a93 to your computer and use it in GitHub Desktop.

Select an option

Save garima33/27d95f91c6844f424f0d2d1781189a93 to your computer and use it in GitHub Desktop.
grid-demo-emotion
import React, { Component } from "react";
import { Flex, DataWrapper } from "./styled-components/index";
import { data } from "./utils/data";
import { Card } from "./components/Card";
import "./App.css";
class App extends Component {
render() {
let items = data.map((item, index) => {
return (
<DataWrapper key={index}>
<Card cardData={item} />
</DataWrapper>
);
});
// color can be customized by passing it as a prop.
return <Flex color="black">{items}</Flex>;
}
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment