♻️(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:
@@ -87,4 +87,11 @@ describe("<Button/>", () => {
|
||||
tokens.themes.default.components.button["border-radius"],
|
||||
).toBeDefined();
|
||||
});
|
||||
|
||||
it("renders with className", async () => {
|
||||
render(<Button className="my-custom-class" />);
|
||||
expect(
|
||||
document.querySelector(".c__button.my-custom-class"),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user