/**
 * ==========================================================
 * OMSORG BUSINESS CONTROLS PRO
 * Component: OmsorgButton
 * Sprint: 0.2.0
 * ==========================================================
 */

export default function OmsorgButton({
  children,
  variant = "primary",
  icon: Icon,
  type = "button",
  disabled = false,
  onClick,
}) {

  const className =
    `omsorg-button omsorg-button--${variant}`;

  return (

    <button
      type={type}
      className={className}
      disabled={disabled}
      onClick={onClick}
    >

      {Icon && <Icon size={18} />}

      <span>

        {children}

      </span>

    </button>

  );

}