Skip to content

Commit

Permalink
Is fix (#35)
Browse files Browse the repository at this point in the history
* fix for composition with other components

* add changeset
  • Loading branch information
nsaunders committed May 26, 2024
1 parent 6a6b56b commit 630ffbd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/flat-garlics-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@embellish/react": patch
---

Fix for component composition via `is` prop.
6 changes: 4 additions & 2 deletions packages/react/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export function createComponent<
const DisplayName extends string,
StyleProps,
Conds,
DefaultIs extends keyof JSX.IntrinsicElements = "div",
DefaultIs extends
| keyof JSX.IntrinsicElements
| React.JSXElementConstructor<any> = "div", // eslint-disable-line @typescript-eslint/no-explicit-any
>(config: {
displayName: DisplayName & ValidComponentDisplayName<DisplayName>;
defaultIs?: DefaultIs;
Expand All @@ -51,7 +53,7 @@ export function createComponent<
}): <
Is extends
| keyof JSX.IntrinsicElements
| React.JSXElementConstructor<unknown> = DefaultIs,
| React.JSXElementConstructor<any> = DefaultIs, // eslint-disable-line @typescript-eslint/no-explicit-any
LocalConditionName extends string = never,
>(
props: {
Expand Down

0 comments on commit 630ffbd

Please sign in to comment.