Skip to content

Commit

Permalink
Fixed className -> class
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryce Kolton committed Oct 17, 2019
1 parent 0b08468 commit 52bf62e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "reactify-wc",
"author": "Bryce Kolton (624), Mercedes-Benz R&D North America, Seattle HUB",
"version": "1.0.3",
"version": "1.0.4",
"license": "MIT",
"description": "Wraps web components in React to allow usage and correct property passthrough",
"module": "dist/index.js",
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const reactifyWebComponent = (WC: string) => {
if (prop === "children") {
return undefined;
}
if (prop.toLowerCase() === "classname") {
return (this.ref.className = val);
}
if (typeof val === "function" && prop.match(/^on[A-Z]/)) {
const event = prop[2].toLowerCase() + prop.substr(3);
this.eventHandlers.push([event, val]);
Expand Down

0 comments on commit 52bf62e

Please sign in to comment.