refactor: move Svelte components to Astro

This commit is contained in:
Stefan Imhoff
2023-02-27 17:28:09 +01:00
parent 6c15bb55cf
commit c3998b9239
13 changed files with 89 additions and 52 deletions

View File

@@ -0,0 +1,20 @@
---
interface Props {
as?: string;
children?: any;
class?: string;
}
const { as = 'h3', class: className, ...props } = Astro.props;
const Element = as;
---
<Element
class:list={[
'text-4 font-black tracking-tight mbe-8 mbs-14 first-of-type:mbs-0 dark:font-extrabold',
className,
]}
{...props}
>
<slot />
</Element>