/*
* Copyright (c) 2021 - 2024, Ludvig Lundgren and the autobrr contributors.
* SPDX-License-Identifier: GPL-2.0-or-later
*/
import { classNames } from "@utils";
import { SVGProps } from "react";
type SectionProps = {
title: string;
titleElement?: React.ReactNode;
description: string | React.ReactNode;
rightSide?: React.ReactNode;
children?: React.ReactNode;
noLeftPadding?: boolean;
};
export const Section = ({
title,
titleElement,
description,
rightSide,
children,
noLeftPadding = false,
}: SectionProps) => (
{titleElement ??
{title}
}
{description}
{rightSide ?? null}
{children}
);
interface RowItemProps {
label: string;
value?: string | React.ReactNode;
title?: string;
emptyText?: string;
rightSide?: React.ReactNode;
className?: string;
}
export const RowItem = ({
label,
value,
title,
emptyText,
rightSide,
className = "sm:col-span-3"
}: RowItemProps) => (
{label}
{value
? (
<>
{typeof (value) === "string" ? (
{value}
) : value}
{rightSide ?? null}
>
)
: (emptyText ?? null)
}
);
const commonSVGProps: SVGProps = {
clipRule: "evenodd", fill: "currentColor", fillRule: "evenodd", xmlns: "http://www.w3.org/2000/svg",
className: "mr-2 h-5"
};
export const DiscordIcon = () => (
);
export const NotifiarrIcon = () => (
);
export const TelegramIcon = () => (
);
export const PushoverIcon = () => (
);
export const GotifyIcon = () => (
);
export const NtfyIcon = () => (
);
export const LunaSeaIcon = () => (
);