refactor: migrate Preact components to Astro

This commit is contained in:
Stefan Imhoff
2024-09-09 18:42:43 +02:00
parent d77c513b7b
commit 526fe22cda
130 changed files with 1154 additions and 1274 deletions

View File

@@ -0,0 +1,21 @@
---
// Cspell:words astro classnames keyof
import cx from 'classnames';
export interface Props {
as?: keyof astroHTML.JSX.IntrinsicElements;
class?: string;
[key: string]: any;
}
const { as: Tag = 'h3', class: className, ...props } = Astro.props;
const classes = cx(
'text-4 font-black tracking-tight mbe-8 dark:font-extrabold [text-wrap:balance]',
className
);
---
<Tag class={classes} {...props}>
<slot />
</Tag>