Skip to content

Commit 4efd21b

Browse files
committed
Add Learn More link to unknown version UI, styled with white text
1 parent 70fe718 commit 4efd21b

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

frontend/components/CustomLink/CustomLink.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface ICustomLinkProps {
1212
/** Icon wraps on new line with last word */
1313
multiline?: boolean;
1414
iconColor?: Colors;
15-
color?: "core-fleet-blue" | "core-fleet-black";
15+
color?: "core-fleet-blue" | "core-fleet-black" | "core-fleet-white";
1616
/** Restricts access via keyboard when CustomLink is part of disabled UI */
1717
disableKeyboardNavigation?: boolean;
1818
}
@@ -31,6 +31,7 @@ const CustomLink = ({
3131
}: ICustomLinkProps): JSX.Element => {
3232
const customLinkClass = classnames(baseClass, className, {
3333
[`${baseClass}--black`]: color === "core-fleet-black",
34+
[`${baseClass}--white`]: color === "core-fleet-white",
3435
});
3536

3637
const target = newTab ? "_blank" : "";

frontend/components/CustomLink/_styles.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,12 @@
1313
&--black {
1414
color: $core-fleet-black;
1515
}
16+
17+
&--black {
18+
color: $core-fleet-black;
19+
}
20+
21+
&--white {
22+
color: $core-fleet-white;
23+
}
1624
}

frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwarePackageCard/SoftwarePackageCard.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import Tag from "components/Tag";
3030
import SoftwareIcon from "pages/SoftwarePage/components/icons/SoftwareIcon";
3131
import endpoints from "utilities/endpoints";
3232
import URL_PREFIX from "router/url_prefix";
33+
import { LEARN_MORE_ABOUT_BASE_LINK } from "utilities/constants";
34+
import CustomLink from "components/CustomLink";
3335

3436
import DeleteSoftwareModal from "../DeleteSoftwareModal";
3537
import EditSoftwareModal from "../EditSoftwareModal";
@@ -318,7 +320,20 @@ const SoftwareInstallerCard = ({
318320
const versionInfo = version ? (
319321
<span>{version}</span>
320322
) : (
321-
<TooltipWrapper tipContent={`Fleet couldn't read the version from ${name}`}>
323+
<TooltipWrapper
324+
tipContent={
325+
<span>
326+
Fleet couldn&apos;t read the version from ${name}.{" "}
327+
<CustomLink
328+
newTab
329+
url={`${LEARN_MORE_ABOUT_BASE_LINK}/read-package-version`}
330+
text="Learn more"
331+
color="core-fleet-white"
332+
iconColor="core-fleet-white"
333+
/>
334+
</span>
335+
}
336+
>
322337
Version (unknown)
323338
</TooltipWrapper>
324339
);

frontend/styles/var/colors.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Core
22
$core-fleet-black: #192147;
3+
$core-fleet-white: #ffffff;
34
$core-fleet-blue: #3e4771;
45
$core-vibrant-blue: #6a67fe;
56
$core-vibrant-red: #ff5c83;

0 commit comments

Comments
 (0)