mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-11 14:04:17 +00:00
fix(ui): stabilize overview responsive layout (#12318)
Co-authored-by: Alan Buscaglia <gentlemanprogramming@gmail.com>
This commit is contained in:
1 parent
6d7b1ef153
commit
a70a69a7d0
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
|
||||
Reference in new issue
Block a user