Refactor button
This commit is contained in:
parent
b76bb491c0
commit
69941d3e62
2 changed files with 8 additions and 2 deletions
|
|
@ -1,7 +1,13 @@
|
||||||
import './Button.sass'
|
import './Button.sass'
|
||||||
import { Show } from 'solid-js'
|
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 <>
|
return <>
|
||||||
<Show when={props.to}>
|
<Show when={props.to}>
|
||||||
<a href={props.to} aria-label={props.label}>
|
<a href={props.to} aria-label={props.label}>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
import Layout from '../layouts/Layout.astro'
|
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 { Picture } from 'astro:assets'
|
||||||
import sample from '/src/images/sample.avif'
|
import sample from '/src/images/sample.avif'
|
||||||
---
|
---
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue