2022-12-21 13:56:42 +01:00
|
|
|
/* @refresh reload */
|
|
|
|
import { type Component } from "solid-js";
|
|
|
|
import type { CardProps } from "../types/interfaces";
|
2022-12-21 15:47:08 +01:00
|
|
|
import { Link } from "./link";
|
2022-12-21 13:56:42 +01:00
|
|
|
|
|
|
|
const Card: Component<CardProps> = ({ children, className, title, to, newTab = false }) => {
|
|
|
|
return (
|
|
|
|
<>
|
2022-12-22 13:09:40 +01:00
|
|
|
<div
|
|
|
|
class={ `relative bg-gradient-to-r from-cyan-600 to-cyan-500 h-32 w-72 rounded-2xl ${ className }` }>
|
|
|
|
<div class="relative p-5">
|
|
|
|
<Link className={ "text-white" } to={ to } newTab={ newTab }>
|
|
|
|
<h3 class={ "text-center w-fit mx-auto before:content-['↗']" }>{ title }</h3>
|
|
|
|
</Link>
|
|
|
|
{ children }
|
2022-12-21 13:56:42 +01:00
|
|
|
</div>
|
2022-12-22 13:09:40 +01:00
|
|
|
</div>
|
|
|
|
|
2022-12-21 13:56:42 +01:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Card;
|