mirror of
https://github.com/fleetdm/fleet
synced 2026-05-16 05:28:38 +00:00
# Checklist for submitter If some of the following don't apply, delete the relevant line. - [ ] Manual QA for all new/changed functionality --------- Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
import React from "react";
|
|
import classnames from "classnames";
|
|
import Graphic from "components/Graphic";
|
|
import { GraphicNames } from "components/graphics";
|
|
|
|
const baseClass = "empty-table";
|
|
|
|
export interface IEmptyTableProps {
|
|
header?: JSX.Element | string;
|
|
info?: JSX.Element | string;
|
|
additionalInfo?: JSX.Element | string;
|
|
graphicName?: GraphicNames;
|
|
primaryButton?: JSX.Element;
|
|
secondaryButton?: JSX.Element;
|
|
className?: string;
|
|
}
|
|
|
|
const EmptyTable = ({
|
|
graphicName,
|
|
header,
|
|
info,
|
|
additionalInfo,
|
|
className,
|
|
primaryButton,
|
|
secondaryButton,
|
|
}: IEmptyTableProps): JSX.Element => {
|
|
const emptyTableClass = classnames(`${baseClass}__container`, className);
|
|
|
|
return (
|
|
<div className={emptyTableClass}>
|
|
{graphicName && (
|
|
<div className={`${baseClass}__image-wrapper`}>
|
|
<Graphic name={graphicName} />
|
|
</div>
|
|
)}
|
|
<div className={`${baseClass}__inner`}>
|
|
{header && <h3>{header}</h3>}
|
|
{info && <p>{info}</p>}
|
|
{additionalInfo && <p>{additionalInfo}</p>}
|
|
</div>
|
|
{primaryButton && (
|
|
<div className={`${baseClass}__cta-buttons`}>
|
|
{primaryButton}
|
|
{secondaryButton && secondaryButton}
|
|
</div>
|
|
)}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default EmptyTable;
|