File size: 489 Bytes
56b6519
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import React, { ReactElement } from 'react';

type CardProps = {
  title: string;
  children: ReactElement;
};

const Card: React.FC<CardProps> = ({ title, children }) => {
  return (
    <div className="rounded-lg bg-gray-900">
      <div className="py-3 mx-4">
        <h2 className="text-xl font-semibold">{title}</h2>
      </div>
      <hr className="h-1 mx-4 bg-gray-600 border-0 rounded" />
      <div className="py-4 mx-4">{children}</div>
    </div>
  );
};

export default Card;