♻️(react) make className standard across components
The className prop was sometimes set onto the nested element and sometimes on the container element, which was not consistent. Now we always set the className onto the upmost element.
This commit is contained in:
@@ -249,4 +249,11 @@ describe("<Alert/>", () => {
|
||||
screen.queryByText("Additional information"),
|
||||
).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("renders with className", async () => {
|
||||
render(<Alert className="my-custom-class" />);
|
||||
expect(
|
||||
document.querySelector(".c__alert.my-custom-class"),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user