backbutton was a backlink so fixed that

This commit is contained in:
Paul Miller
2023-04-29 23:27:17 -05:00
parent 31f4baba40
commit b383dfd275
6 changed files with 16 additions and 11 deletions

View File

@@ -1,6 +1,5 @@
import { A } from "solid-start";
import { Back } from "~/assets/svg/Back";
export function BackButton(props: { href?: string, title?: string }) {
return (<A href={props.href ? props.href : "/"} class="text-m-red active:text-m-red/80 text-xl font-semibold no-underline md:hidden flex items-center"><Back />{props.title ? props.title : "Home"}</A>)
export function BackButton(props: { onClick: () => void, title?: string }) {
return (<button onClick={props.onClick} class="text-m-red active:text-m-red/80 text-xl font-semibold no-underline md:hidden flex items-center"><Back />{props.title ? props.title : "Home"}</button>)
}

View File

@@ -0,0 +1,6 @@
import { A } from "solid-start";
import { Back } from "~/assets/svg/Back";
export function BackLink(props: { href?: string, title?: string }) {
return (<A href={props.href ? props.href : "/"} class="text-m-red active:text-m-red/80 text-xl font-semibold no-underline md:hidden flex items-center"><Back />{props.title ? props.title : "Home"}</A>)
}