import { isExternalURL } from "@dashboard/utils/urls"; import { IconButton as MacawIconButton, IconButtonProps, } from "@saleor/macaw-ui"; import React from "react"; import { Link } from "react-router-dom"; const _IconButton: React.FC = React.forwardRef( ({ href, ...props }, ref) => { if (href && !isExternalURL(href)) { return ( ); } return ; }, ); export const IconButton = _IconButton as < T extends React.ElementType = "button" >( props: IconButtonProps, ) => ReturnType;