create navigation card-button
This commit is contained in:
1 parent
c6e4801ff6
commit
6770eba5b6
2 files changed
+131
No files matched your search
@@ -0,0 +1,31 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user