fix(ui): stabilize overview responsive layout (#12317)

This commit is contained in:
Alan Buscaglia authored and GitHub committed 2026-08-04 11:18:10 +02:00
1 parent 681be7537d
commit 162c6560d9
3 files changed
+19 -1

No files matched your search

@@ -0,0 +1,17 @@
import { render, screen } from "@testing-library/react";
import { describe, expect, it } from "vitest";
import { ThreatScore } from "./threat-score";
describe("ThreatScore", () => {
it("keeps the card full width until the overview row becomes horizontal", () => {
render(<ThreatScore score={75} />);
const card = screen
.getByText("Prowler ThreatScore")
.closest('[data-slot="card"]');
expect(card).toHaveClass("xl:max-w-[312px]");
expect(card).not.toHaveClass("lg:max-w-[312px]");
});
});
@@ -115,7 +115,7 @@ export function ThreatScore({
return (
<Card
variant="base"
className="flex min-h-[372px] w-full flex-col justify-between lg:max-w-[312px]"
className="flex min-h-[372px] w-full flex-col justify-between xl:max-w-[312px]"
>
<CardHeader>
<CardTitle>Prowler ThreatScore</CardTitle>
@@ -0,0 +1 @@
Overview ThreatScore card no longer leaves unused horizontal space at responsive layout boundaries