Files
Frontend/src/components/GeneratorCard/GeneratorCard.tsx
T

32 lines
713 B
TypeScript

import styles from "./GeneratorCard.module.css";
interface GeneratorCardProps{
title: string;
description: string;
label: string;
accent: "cyan" | "violet";
onClick: () => void;
};
export default function GeneratorCard({
title,
description,
label,
accent,
onClick,
}: GeneratorCardProps) {
return (
<button
className={`${styles.card} ${styles[accent]}`}
type="button"
onClick={onClick}
aria-label={label}
>
<span className={styles.kicker}>{label}</span>
<span className={styles.title}>{title}</span>
<span className={styles.description}>{description}</span>
<span className={styles.action}>Открыть</span>
</button>
);
}