MCPcopy Create free account
hub / github.com/api-platform/website / TextIconInfo

Function TextIconInfo

pwa/components/common/TextIconInfo.tsx:5–41  ·  view source on GitHub ↗
({
  Icon,
  children,
  link,
  higlightIcon,
}: {
  link?: string;
  Icon: React.ComponentType<IconProps>;
  higlightIcon?: boolean;
} & PropsWithChildren)

Source from the content-addressed store, hash-verified

3import { PropsWithChildren } from "react";
4
5export 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 &nbsp;
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 &nbsp;
36 {children}
37 </div>
38 )}
39 </div>
40 );
41}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected