import { AlertCircleIcon, RotateCwIcon } from 'lucide-react'; import { classNames } from '../../lib/utils'; import { Button } from '../ui/button'; import { Callout } from '../ui/callout'; import { TableCell, TableRow } from '../ui/table'; /** * A list that could not be read: what the server said, and a way to ask * again, instead of red text over a table that looks empty. * * @param props - Component props. * @param props.message - What went wrong. * @param props.onRetry - Read the list again. * @return The notice. */ export const ListError = ({ message, onRetry, }: { message: string; onRetry: () => void; }): JSX.Element => (

The list could not be read: {message}

); /** * Rows standing in for a list on its way, so a table that is loading does * not read as an empty one. * * @param props - Component props. * @param props.cells - The class of each column's cell, so columns that * hide on narrow screens hide here too. * @param props.rows - How many rows. * @return The rows. */ export const SkeletonRows = ({ cells, rows = 5, }: { cells: string[]; rows?: number; }): JSX.Element => ( <> {Array.from({ length: rows }, (_, row) => (