mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-09-03 04:18:06 +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:
@@ -332,4 +332,11 @@ describe("Test renderRepoCard", () => {
|
||||
);
|
||||
expect(queryByTestId(document.body, "badge")).toHaveTextContent("模板");
|
||||
});
|
||||
|
||||
it("should render without rounding", () => {
|
||||
document.body.innerHTML = renderRepoCard(data_repo.repository, { border_radius: "0" });
|
||||
expect(document.querySelector("rect")).toHaveAttribute("rx", "0");
|
||||
document.body.innerHTML = renderRepoCard(data_repo.repository, { });
|
||||
expect(document.querySelector("rect")).toHaveAttribute("rx", "4.5");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user