import { MagnifyingGlass } from "@phosphor-icons/react/dist/ssr/MagnifyingGlass"; import { Button } from "@pythnetwork/component-library/Button"; import type { ReactNode } from "react"; import styles from "./index.module.scss"; type Props = { onClearSearch?: (() => void) | undefined; } & ( | { query: string } | { icon: ReactNode; header: string; body: string; variant?: Variant | undefined; } ); type Variant = "success" | "error" | "warning" | "info" | "data"; export const NoResults = ({ onClearSearch, ...props }: Props) => (
{"icon" in props ? props.icon : }

{"header" in props ? props.header : "No results found"}

{"body" in props ? props.body : `We couldn't find any results for ${props.query === "" ? "your query" : `"${props.query}"`}.`}

{onClearSearch && ( )}
);