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,20 @@
---
// Cspell:words astro classnames
import cx from 'classnames';
import TextLink from './TextLink.astro';
export interface Props {
asin: string;
class?: string;
text: string;
[key: string]: any;
}
const { asin, class: className, text, ...props } = Astro.props;
const classes = cx('product', className);
---
<TextLink class={classes} href={`https://www.amazon.de/gp/product/${asin}`} {...props}>
{text}
</TextLink>