-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(react): refactor generate-react-exports (#725)
* Simplifies the logic of `generate-react-exports.js` as types are inferred, removing the need of generics * Simplifies the React export making it more readable ```tsx /** * @tag bl-textarea * @summary Baklava Textarea component */ export const BlTextarea = React.lazy(() => customElements.whenDefined("bl-textarea").then(() => ({ default: createComponent({ react: React, displayName: "BlTextarea", tagName: "bl-textarea", elementClass: customElements.get("bl-textarea") as Constructor<BlTextarea>, events: { onBlInput: "bl-input" as EventName<BlTextareaInput>, onBlChange: "bl-change" as EventName<BlTextareaChange>, onBlInvalid: "bl-invalid" as EventName<BlTextareaInvalid>, }, }), })) ); ``` --------- Co-authored-by: Aykut Saraç <[email protected]>
- Loading branch information
1 parent
caa388c
commit 43b5208
Showing
5 changed files
with
49 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,5 @@ | |
} | ||
] | ||
}, | ||
"include": ["./src/**/*.ts", "./src/**/*/*.test.ts"], | ||
"exclude": [] | ||
"include": ["src"], | ||
} |