my-react-lib-prashant 1.0.4 → 1.0.6

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 CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "my-react-lib-prashant",
3
- "version": "1.0.4",
4
- "main": "src/main.jsx",
3
+ "version": "1.0.6",
4
+ "main": "dist/my-react-lib-prashant.js",
5
+ "module": "dist/my-react-lib-prashant.js",
5
6
  "type": "module",
6
7
  "scripts": {
7
8
  "dev": "vite",
package/src/main.jsx CHANGED
@@ -3,6 +3,11 @@ import ReactDOM from "react-dom/client";
3
3
  import reactToWebComponent from "react-to-webcomponent";
4
4
  import TextBox from "./components/TextBox";
5
5
 
6
- const WebTextBox = reactToWebComponent(TextBox, React, ReactDOM);
6
+ const WebTextBox = reactToWebComponent(TextBox, React, ReactDOM, {
7
+ props: {
8
+ label: "string",
9
+ placeholder: "string"
10
+ }
11
+ });
7
12
 
8
13
  customElements.define("my-textbox", WebTextBox);
package/vite.config.js CHANGED
@@ -6,8 +6,8 @@ export default defineConfig({
6
6
  build: {
7
7
  lib: {
8
8
  entry: './src/main.jsx',
9
- name: 'textboxlib',
10
- fileName: 'textboxlib'
9
+ name: 'MyReactLib',
10
+ fileName: 'my-react-lib-prashant'
11
11
  }
12
12
  }
13
13
  })