Added list of apis to card, changed link to only cover headline
This commit is contained in:
@ -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>
|
||||
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
@ -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>
|
||||
|
@ -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>;
|
||||
};
|
Reference in New Issue
Block a user