feat: Initialize project
This commit is contained in:
1 parent
eccc32337f
commit
3c1050898e
65 files changed
+5661
-596
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import { FC } from 'react';
|
||||
import { Star } from 'lucide-react';
|
||||
|
||||
import Poster from '@/components/Movie/components/Poster';
|
||||
import Title from '@/components/Movie/components/Title';
|
||||
|
||||
interface Props {
|
||||
movie?: Movie;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const Card: FC<Props> = ({ movie, className }) => {
|
||||
if (!movie) return null;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`${className} p-4 rounded-lg border bg-card text-card-foreground shadow-sm transition-shadow hover:shadow-lg`}
|
||||
>
|
||||
<div>
|
||||
<div className='grid items-center grid-cols-[1fr_70px]'>
|
||||
<Title title={movie.title} />
|
||||
{movie.release_date && (
|
||||
<span className='flex justify-end text-lg font-semibold'>{new Date(movie.release_date).getFullYear()}</span>
|
||||
)}
|
||||
</div>
|
||||
<div className='flex w-full justify-between'>
|
||||
<Star />
|
||||
<span className='text-lg font-semibold'>{movie.vote_average}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className='flex justify-center relative'>
|
||||
<Poster title={movie.title} width={300} height={450} size={100} poster={movie.poster_path} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Card;
|
||||
Reference in new issue
Block a user