({
Icon,
children,
link,
higlightIcon,
}: {
link?: string;
Icon: React.ComponentType<IconProps>;
higlightIcon?: boolean;
} & PropsWithChildren)
| 3 | import { PropsWithChildren } from "react"; |
| 4 | |
| 5 | export default function TextIconInfo({ |
| 6 | Icon, |
| 7 | children, |
| 8 | link, |
| 9 | higlightIcon, |
| 10 | }: { |
| 11 | link?: string; |
| 12 | Icon: React.ComponentType<IconProps>; |
| 13 | higlightIcon?: boolean; |
| 14 | } & PropsWithChildren) { |
| 15 | return ( |
| 16 | <div className="py-1"> |
| 17 | {link ? ( |
| 18 | <a |
| 19 | href={link} |
| 20 | rel="noopener noreferrer" |
| 21 | target="_blank" |
| 22 | className="flex flex-row items-center transition-all font-semibold link" |
| 23 | > |
| 24 | <Icon |
| 25 | className={classNames("w-5 h-5", higlightIcon && "text-blue")} |
| 26 | /> |
| 27 | |
| 28 | {children} |
| 29 | </a> |
| 30 | ) : ( |
| 31 | <div className="flex flex-row items-center"> |
| 32 | <Icon |
| 33 | className={classNames("w-5 h-5", higlightIcon && "text-blue")} |
| 34 | /> |
| 35 | |
| 36 | {children} |
| 37 | </div> |
| 38 | )} |
| 39 | </div> |
| 40 | ); |
| 41 | } |
nothing calls this directly
no outgoing calls
no test coverage detected