diff --git a/src/components/TitleCard/index.tsx b/src/components/TitleCard/index.tsx new file mode 100644 index 000000000..710d3aed9 --- /dev/null +++ b/src/components/TitleCard/index.tsx @@ -0,0 +1,96 @@ +import React, { useState } from 'react'; +import Transition from '../Transition'; + +interface TitleCardProps { + image: string; + summary: string; + year: string; + title: string; + userScore: number; + + //TODO - change to ENUM + status: string; +} + +const TitleCard: React.FC = ({ + image, + summary, + year, + title, + userScore, + status, +}) => { + const [showDetail, setShowDetail] = useState(false); + + return ( +
+
setShowDetail(true)} + onMouseLeave={() => setShowDetail(false)} + > +
+ +
+
+
+ {year} +
+ +

+ {title} +

+
+ {summary} +
+ +
+ + Status: {status} + + + + User Score: {userScore}/100 + +
+
+ +
+
+
+
+
+ ); +}; + +export default TitleCard; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index b75500526..9cebb384a 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,12 +1,19 @@ import React from 'react'; -import { NextPage } from 'next'; +import type { NextPage } from 'next'; +import TitleCard from '../components/TitleCard'; const Index: NextPage = () => { return ( -
-

Overseer

-

Here is some text

-
+ <> + + ); }; diff --git a/src/styles/globals.css b/src/styles/globals.css index 1fe682ded..32d727415 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -6,3 +6,8 @@ @apply inline-flex items-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-md text-white bg-indigo-600 transition ease-in-out duration-150; background-color: #cc7b19; } + +.titleCard { + @apply relative bg-cover rounded-lg; + padding-bottom: 150%; +}