import React, { ComponentProps, PropsWithChildren, ReactNode } from "react"; import { twMerge } from "tailwind-merge"; import Stack from "../layout/Stack"; import Border from "./Border"; import Center from "../layout/Center"; import Row from "../layout/Row"; import Span from "../layout/Span"; import Link from "../layout/Link"; export const ToastStyles = ["normal", "success", "error"] as const; export const ToastColors = ToastStyles; export type TWUIEmptyContentProps = ComponentProps & { title: string; url?: string; linkProps?: ComponentProps; borderProps?: ComponentProps; textProps?: ComponentProps; contentWrapperProps?: ComponentProps; icon?: ReactNode; }; /** * # EmptyC ontent Component * @className twui-empty-content * @className twui-empty-content-border * @className twui-empty-content-link */ export default function EmptyContent({ title, url, linkProps, icon, borderProps, textProps, contentWrapperProps, ...props }: TWUIEmptyContentProps) { const mainComponent = (
{icon &&
{icon}
} {title}
); if (url) { return ( {mainComponent} ); } return mainComponent; }