mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-09-04 08:19:35 +00:00
feat: add corner rounding parameter so we can make square cards (#845)
* add corner rounding parameter so i can make square cards * rename rx to border_radius
This commit is contained in:
@@ -262,4 +262,11 @@ describe("Test renderStatsCard", () => {
|
||||
).textContent,
|
||||
).toBe("参与项目数:");
|
||||
});
|
||||
|
||||
it("should render without rounding", () => {
|
||||
document.body.innerHTML = renderStatsCard(stats, { border_radius: "0" });
|
||||
expect(document.querySelector("rect")).toHaveAttribute("rx", "0");
|
||||
document.body.innerHTML = renderStatsCard(stats, { });
|
||||
expect(document.querySelector("rect")).toHaveAttribute("rx", "4.5");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user