my-react-lib-prashant 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/main.jsx +7 -9
- package/src/web-components.js +3 -7
package/package.json
CHANGED
package/src/main.jsx
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ReactDOM from "react-dom";
|
|
3
|
+
import reactToWebComponent from "react-to-webcomponent";
|
|
4
|
+
import TextBox from "./TextBox";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</StrictMode>,
|
|
10
|
-
)
|
|
6
|
+
const MyTextbox = reactToWebComponent(TextBox, React, ReactDOM);
|
|
7
|
+
|
|
8
|
+
customElements.define("my-textbox", MyTextbox);
|
package/src/web-components.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import ReactDOM from "react-dom";
|
|
3
3
|
import reactToWebComponent from "react-to-webcomponent";
|
|
4
|
-
import TextBox from "./
|
|
4
|
+
import TextBox from "./TextBox";
|
|
5
5
|
|
|
6
|
-
const
|
|
7
|
-
TextBox,
|
|
8
|
-
React,
|
|
9
|
-
ReactDOM
|
|
10
|
-
);
|
|
6
|
+
const MyTextbox = reactToWebComponent(TextBox, React, ReactDOM);
|
|
11
7
|
|
|
12
|
-
customElements.define("my-textbox",
|
|
8
|
+
customElements.define("my-textbox", MyTextbox);
|