import styles from "./index.module.scss";

interface EmptyResult {
  className?: string;
  icon?: string;
  title?: string;
  desc?: string;
  children?: JSX.Element;
}

export default function EmptyResult(props: EmptyResult) {
  const { icon, title, desc, children } = props;

  return (
    <div className={styles.root}>
      {icon ? (
        <svg className={styles.icon}>
          <use xlinkHref={`/icons.svg#${icon}`}></use>
        </svg>
      ) : null}
      {title ? <h2>{title}</h2> : null}
      {desc ? <p>{desc}</p> : null}
      {children}
    </div>
  );
}
