mirror of https://github.com/sylv/micro.git
20 lines
601 B
TypeScript
20 lines
601 B
TypeScript
import { FunctionComponent } from "react";
|
|
import { GetFileData } from "@micro/api";
|
|
import { Link } from "../link";
|
|
import { FileListCardContent } from "./file-list-card-content";
|
|
|
|
export interface FileCardProps {
|
|
file: GetFileData;
|
|
}
|
|
|
|
export const FileListCard: FunctionComponent<FileCardProps> = (props) => {
|
|
return (
|
|
<Link
|
|
className="relative flex items-center justify-center h-full overflow-hidden transition-colors rounded-lg shadow max-h-48 bg-dark-200 hover:bg-dark-400"
|
|
href={props.file.urls.view}
|
|
>
|
|
<FileListCardContent file={props.file} />
|
|
</Link>
|
|
);
|
|
};
|