mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-22 12:08:29 +03:00
Some checks failed
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
* Correctly set query padding * Adjust AMD headers and add community badge * Simplify getting started guide for camera wizard * add optimizing performance guide * tweaks * fix character issue * fix more characters * fix links * fix more links * Refactor new docs * Add import * Fix link * Don't list hardware * Reduce redundancy in titles * Add note about Intel NPU and addon * Fix ability to specify if card is using heading * improve display of area percentage * fix text color on genai summary chip * fix indentation in genai docs * Adjust default config model to align with recommended * add correct genai key --------- Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
48 lines
1.0 KiB
TypeScript
48 lines
1.0 KiB
TypeScript
import React from "react";
|
|
import { Button } from "../ui/button";
|
|
import Heading from "../ui/heading";
|
|
import { Link } from "react-router-dom";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
type EmptyCardProps = {
|
|
className?: string;
|
|
icon: React.ReactNode;
|
|
title: string;
|
|
titleHeading?: boolean;
|
|
description?: string;
|
|
buttonText?: string;
|
|
link?: string;
|
|
};
|
|
export function EmptyCard({
|
|
className,
|
|
icon,
|
|
title,
|
|
titleHeading = true,
|
|
description,
|
|
buttonText,
|
|
link,
|
|
}: EmptyCardProps) {
|
|
let TitleComponent;
|
|
|
|
if (titleHeading) {
|
|
TitleComponent = <Heading as="h4">{title}</Heading>;
|
|
} else {
|
|
TitleComponent = <div>{title}</div>;
|
|
}
|
|
|
|
return (
|
|
<div className={cn("flex flex-col items-center gap-2", className)}>
|
|
{icon}
|
|
{TitleComponent}
|
|
{description && (
|
|
<div className="mb-3 text-secondary-foreground">{description}</div>
|
|
)}
|
|
{buttonText?.length && (
|
|
<Button size="sm" variant="select">
|
|
<Link to={link ?? "#"}>{buttonText}</Link>
|
|
</Button>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|