import React, { AnchorHTMLAttributes } from "react";
import { ExternalLinkAltIcon } from "@patternfly/react-icons";
import type { IFormatter, IFormatterValueType } from "@patternfly/react-table";
export type FormattedLinkProps = AnchorHTMLAttributes & {
isInline?: boolean;
};
export const FormattedLink = ({
title,
href,
isInline,
...rest
}: FormattedLinkProps) => {
return (
{title ? title : href}{" "}
{href?.startsWith("http") && }
);
};
export const formattedLinkTableCell = (): IFormatter => (
data?: IFormatterValueType
) => {
return (data ? (
) : undefined) as object;
};