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:
1 parent
ad486d1aa2
commit
c8a5e835a5
14 files changed
+49
-1
No files matched your search
@@ -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