24 lines
783 B
TypeScript
Raw Normal View History

2022-12-21 13:56:42 +01:00
/* @refresh reload */
import { type Component } from "solid-js";
import type { CardProps } from "../types/interfaces";
import { H3 } from "./text";
import { Link } from "./link";
2022-12-21 13:56:42 +01:00
const Card: Component<CardProps> = ({ children, className, title, to, newTab = false }) => {
return (
<>
<Link className={ "text-white" } to={ to } newTab={ newTab }>
2022-12-21 13:56:42 +01:00
<div
class={ `relative bg-gradient-to-r from-cyan-600 to-cyan-500 h-32 w-64 rounded-2xl ${ className }` }>
2022-12-21 13:56:42 +01:00
<div class="relative p-5">
<H3 className={ "text-center" }>{ title }</H3>
{ children }
</div>
</div>
</Link>
2022-12-21 13:56:42 +01:00
</>
);
};
export default Card;