Skip to content

Commit f9ec046

Browse files
committed
refactor text and InfoIconWrapper component
Signed-off-by: Ricardo M G da Silva <[email protected]>
1 parent a25ad45 commit f9ec046

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

src/components/Dialogs/base/FormCatalogFields.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ const FormCatalogFields: React.FC<IFormCatalogFieldsProps> = ({
6161
<>
6262
<div className="w-full rounded-md bg-black bg-opacity-80 p-2">
6363
<h1 className="font-bold">
64-
Add fields for Cataloging to ensure quality and discoverability of
65-
Thing Models
64+
The following fields will be added in the background to your TM for
65+
cataloging purposes to ensure quality and discoverability of Thing
66+
Models.
6667
</h1>
6768
<div className="mx-auto w-[70%] flex-col px-4">
6869
<DialogTextField

src/components/InfoIcon/InfoIconWrapper.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,29 @@ const InfoIconWrapper: React.FC<IInfoIconWrapperProps> = (props) => {
3737
? `flex ${props.className}`
3838
: "flex justify-center";
3939

40+
const handleClick = () => {
41+
if (!isHrefEmpty) {
42+
window.open(props.tooltip.href, "_blank");
43+
}
44+
};
45+
4046
return (
4147
<div className={containerClass}>
4248
<div className="pr-0.5">{props.children}</div>
43-
<button
44-
onClick={() =>
45-
!isHrefEmpty && window.open(props.tooltip.href, "_blank")
46-
}
47-
disabled={isHrefEmpty}
49+
<div
50+
role="link"
51+
tabIndex={isHrefEmpty ? -1 : 0}
52+
onClick={handleClick}
53+
aria-disabled={isHrefEmpty}
54+
className={`cursor-${isHrefEmpty ? "default" : "pointer"}`}
55+
aria-label={isHrefEmpty ? "Info" : "More information"}
4856
>
4957
<Icon
5058
html={props.tooltip.html || "No tooltip content available"}
5159
id={props.id}
5260
IconComponent={Info}
5361
/>
54-
</button>
62+
</div>
5563
<div className="p-1"></div>
5664
</div>
5765
);

src/components/TDViewer/components/InteractionSection.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ const InteractionSection: React.FC<IInteractionSectionProps> = (props) => {
421421
onRowClick={handleOnRowClick}
422422
onSendRequestClick={handleOnClickSendRequest}
423423
baseUrl={td.base ?? ""}
424+
requestResults={{}}
424425
/>
425426
);
426427
}

0 commit comments

Comments
 (0)