Refactor button

This commit is contained in:
Patrick Alvin Alcala 2025-06-05 18:19:54 +08:00
parent b76bb491c0
commit 69941d3e62
2 changed files with 8 additions and 2 deletions

View file

@ -1,7 +1,13 @@
import './Button.sass'
import { Show } from 'solid-js'
export default (props: { label?: string; to?: string; onClick?: () => void; }) => {
interface Props {
label?: string;
to?: string;
onClick?: () => void;
}
export default (props: Props) => {
return <>
<Show when={props.to}>
<a href={props.to} aria-label={props.label}>

View file

@ -1,6 +1,6 @@
---
import Layout from '../layouts/Layout.astro'
import Button from '../components/ButtonComponent/Button.tsx'
import Button from '../builtin-components/Button/Button.tsx'
import { Picture } from 'astro:assets'
import sample from '/src/images/sample.avif'
---