import { ReactNode } from "react";

import "./PanelSpinner.css";
import { getCN, isDevaice, getClassName } from "../utils";

import { IconSpinner } from "../../svg_icons/IconSpinner";

function PanelSpinner({
  children,
  icon = children,
  size = 36,
  ...props
}: {
  [x: string]: any;
}) {
  return (
    <div className={getClassName(`PanelSpinner`)}>
      <div {...props} className={getClassName(`PanelSpinner__in`)}>
        {!icon ? <IconSpinner width={size} height={size} /> : icon}
      </div>
    </div>
  );
}
export default PanelSpinner;
