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:
21
src/components/Subheadline.astro
Normal file
21
src/components/Subheadline.astro
Normal 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>
|
||||
Reference in New Issue
Block a user