Skip to content

Commit

Permalink
fixes #5938
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Jul 26, 2023
1 parent 2ed7eb4 commit bc3255d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/Components/Assets/AssetWarrantyCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import moment from "moment";
import CareIcon from "../../CAREUI/icons/CareIcon";
import { AssetData } from "./AssetTypes";
import { classNames } from "../../Utils/utils";

export default function AssetWarrantyCard(props: { asset: AssetData }) {
const { asset } = props;
Expand Down Expand Up @@ -53,7 +54,9 @@ export default function AssetWarrantyCard(props: { asset: AssetData }) {
}
className="border-b border-primary-300 text-primary-300 hover:text-primary-400"
>
<CareIcon className={"care-l- mr-1 h-5" + item[2]} />
<CareIcon
className={classNames(`care-l-${item[2]}`, "mr-1")}
/>
{item[1]}
</a>
</>
Expand Down
6 changes: 4 additions & 2 deletions src/Components/Common/Uptime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useDispatch } from "react-redux";
import * as Notification from "../../Utils/Notifications.js";
import { AssetStatus, AssetUptimeRecord } from "../Assets/AssetTypes";
import { reverse } from "lodash";
import { classNames } from "../../Utils/utils";

const STATUS_COLORS = {
Operational: "bg-green-500",
Expand Down Expand Up @@ -150,13 +151,14 @@ function UptimeInfoPopover({
return (
<Popover className="relative mt-10 hidden sm:block">
<Popover.Panel
className={`absolute z-50 w-64 px-4 sm:px-0 lg:w-96${
className={classNames(
"absolute z-50 w-64 px-4 sm:px-0 lg:w-96",
day > numDays - 10
? "-translate-x-6"
: day < 10
? "-translate-x-full"
: "-translate-x-1/2"
}`}
)}
static
>
<UptimeInfo records={records} date={date} />
Expand Down

0 comments on commit bc3255d

Please sign in to comment.