{"size": 555, "ext": "js", "max_stars_repo_path": "src/components/Card.js", "max_stars_repo_name": "manavm1990/trivia-game", "max_stars_repo_stars_event_min_datetime": "2020-11-30T23:48:06.000Z", "max_stars_repo_stars_event_max_datetime": "2020-11-30T23:51:06.000Z", "max_issues_repo_path": "src/components/Card.js", "max_issues_repo_name": "manavm1990/trivia-game", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/Card.js", "max_forks_repo_name": "manavm1990/trivia-game", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 9, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.5555555556, "max_line_length": 73, "alphanum_fraction": 0.6702702703}
import PropTypes from "prop-types";
import React from "react";

import { motion } from "framer-motion";

const variants = {
  hidden: { opacity: 0 },
  visible: { opacity: 1 },
};

const Card = ({ children, heading }) => (
  <motion.section initial="hidden" animate="visible" variants={variants}>
    <h2>{heading}</h2>
    {children}
  </motion.section>
);

Card.propTypes = {
  children: PropTypes.oneOfType([
    PropTypes.arrayOf(PropTypes.node),
    PropTypes.object,
  ]).isRequired,
  heading: PropTypes.string.isRequired,
};

export default Card;
