textmachine/frontend/src/showcase/Blank.tsx

28 lines
980 B
TypeScript

import styles from './Blank.module.css';
interface Props {
title: string;
description: string;
/**
* A wait, not a state of the data. Such a card only becomes visible once the wait is long enough
* to be worth explaining — see the rule in the stylesheet.
*/
waiting?: boolean;
}
/**
* A stub of a screen: the empty-state form from antigravity_main.png — one composite block in the
* centre of the emptiness, with no illustrations. It is the card of the three branches of a read
* (`Loaded`) and of the empty centre of the document panel — the showcase no longer opens tabs
* whose content is a placeholder screen.
*/
export function Blank({ title, description, waiting = false }: Props) {
return (
<div className={styles.blank}>
<div className={`${styles.card} ${waiting ? styles.waiting : ''}`}>
<h2 className={styles.title}>{title}</h2>
<p className={styles.description}>{description}</p>
</div>
</div>
);
}