Skip to content

Commit

Permalink
fix(material): use the component property
Browse files Browse the repository at this point in the history
Closes #234
  • Loading branch information
juanrgm committed Jul 5, 2023
1 parent eefb8a3 commit 422201c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/olive-cows-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@suid/material": patch
---

Fix `component` property in `Paper`
16 changes: 16 additions & 0 deletions packages/material/src/Paper/Paper.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Paper from "./Paper";
import { screen, render } from "solid-testing-library";
import { describe, expect, it } from "vitest";

describe("Paper", () => {
it("respects the size property", () => {
const { unmount } = render(() => (
<Paper data-testid="e" component="form" />
));
const e = screen.getByTestId("e");
expect(e.nodeName).toBe("FORM");
unmount();
});
});

export {};
1 change: 1 addition & 0 deletions packages/material/src/Paper/Paper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const Paper = $.component(function Paper({

return (
<PaperRoot
as={otherProps.component}
{...otherProps}
ownerState={allProps}
class={clsx(classes.root, allProps.class)}
Expand Down

0 comments on commit 422201c

Please sign in to comment.