Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | import React from "react";
import "./TitleCard.css";
export interface TitleCardProps {
title: string;
description?: string;
fadeInIdx?: number;
components?: React.ReactNode[];
}
export const TitleCard: React.FC<TitleCardProps> = (props) => {
const animDuration = `${props.fadeInIdx ?? 0.33}s`;
return (
<div
className="titlecard fade-in"
style={{ animationDuration: animDuration }}
>
<h2>{props.title}</h2>
<p>{props.description}</p>
<br></br>
{props.components}
</div>
);
};
|