mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 20:15:27 +00:00
refactor: migrate Preact components to Astro
This commit is contained in:
20
src/components/ProductLink.astro
Normal file
20
src/components/ProductLink.astro
Normal 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>
|
||||
Reference in New Issue
Block a user