Added list of apis to card, changed link to only cover headline

This commit is contained in:
Martin Berg Alstad
2022-12-22 13:09:40 +01:00
parent ac8d7936da
commit 91efb8e14e
5 changed files with 46 additions and 25 deletions

View File

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

View File

@ -2,12 +2,11 @@
import { type Component } from "solid-js";
import type { TitleProps } from "../types/interfaces";
import { H1 } from "./text";
const Header: Component<TitleProps> = ({ className, title }) => {
return (
<header class={ className }>
<H1 className={ "text-center text-cyan-500" }>{ title }</H1>
<h1 class={ "text-center text-cyan-500" }>{ title }</h1>
<div class={"mx-auto w-fit"}>
<p>Av Martin Berg Alstad</p>
</div>

View File

@ -1,10 +0,0 @@
import { type Component } from "solid-js";
import type { ChildProps } from "../types/interfaces";
export const H1: Component<ChildProps> = ({ children, className }) => {
return <h1 class={ `text-4xl ${ className }` }>{ children }</h1>;
};
export const H3: Component<ChildProps> = ({ children, className }) => {
return <h3 class={ `text-2xl ${ className }` }>{ children }</h3>;
};