mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-04 04:25:28 +00:00
refactor: replace classnames with class:list
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
---
|
||||
// Cspell:words astro classnames keyof
|
||||
import cx from 'classnames';
|
||||
|
||||
// Cspell:words astro keyof
|
||||
export interface Props {
|
||||
as?: keyof astroHTML.JSX.IntrinsicElements;
|
||||
class?: string;
|
||||
@@ -9,13 +7,14 @@ export interface Props {
|
||||
}
|
||||
|
||||
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}>
|
||||
<Tag
|
||||
class:list={[
|
||||
'text-4 font-black tracking-tight mbe-8 [text-wrap:balance] dark:font-extrabold',
|
||||
className,
|
||||
]}
|
||||
{...props}
|
||||
>
|
||||
<slot />
|
||||
</Tag>
|
||||
|
||||
Reference in New Issue
Block a user