@getcredify/credify-insurance-widget 1.5.4 → 1.5.5

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Credify Insurance Widget
2
2
 
3
- A React-based insurance quote widget that can be embedded via script tag or iframe.
3
+ A React-based insurance quote widget that can be installed via npm package or embedded via script tag or iframe.
4
4
 
5
5
  ## Installation
6
6
 
@@ -70,11 +70,10 @@ Install and import the widget in your React application:
70
70
 
71
71
  ```tsx
72
72
  import { CredifyInsuranceWidget } from '@getcredify/credify-insurance-widget';
73
- import '@getcredify/credify-insurance-widget/widget.css';
74
73
 
75
74
  function App() {
76
75
  useEffect(() => {
77
- // Initialize the widget
76
+ // Initialize the widget (styles are injected automatically)
78
77
  CredifyInsuranceWidget.init({ autoOpen: false });
79
78
  }, []);
80
79
 
@@ -87,11 +86,11 @@ function App() {
87
86
  }
88
87
  ```
89
88
 
90
- **Note:** Make sure to import the CSS file for proper styling.
89
+ **Note:** The widget injects its own styles at runtime. You can optionally import `@getcredify/credify-insurance-widget/widget.css` if you prefer to load styles separately (e.g. for caching).
91
90
 
92
91
  ### Method 2: Script Tag Embedding (UMD)
93
92
 
94
- Include the widget as a script tag on your page:
93
+ Include the widget as a script tag on your page. No separate CSS file is required—styles are injected when the script runs.
95
94
 
96
95
  ```html
97
96
  <!DOCTYPE html>
@@ -249,7 +248,7 @@ The simplest way to integrate the widget is to embed it directly in your page an
249
248
  <!-- For React 18: Use UMD builds -->
250
249
  <!-- <script src="https://unpkg.com/react@18/umd/react.production.min.js"></script> -->
251
250
  <!-- <script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script> -->
252
-
251
+
253
252
  <!-- For React 19: Use ESM (no UMD builds available) -->
254
253
  <script type="module">
255
254
  // Import React 19 as ESM modules - use exact same version for both
@@ -268,7 +267,6 @@ The simplest way to integrate the widget is to embed it directly in your page an
268
267
  };
269
268
  document.head.appendChild(script);
270
269
  </script>
271
- <link rel="stylesheet" href="https://widget.getcredify.com/credify-insurance-widget.css" />
272
270
  </head>
273
271
  <body>
274
272
  <button id="open-btn">Get Insurance Quote</button>