add-to-calendar-button 2.3.0 → 2.3.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/README.md CHANGED
@@ -38,8 +38,6 @@ Works with **all modern browsers** (Chrome, Edge, Firefox, Safari) on **Windows,
38
38
 
39
39
  See [add-to-calendar-button.com](https://add-to-calendar-button.com/) for a live demo and playground.
40
40
 
41
- And remember to [⭐ **star** this repository](#) in order to stay up-to-date and save it for later! 🤗
42
-
43
41
  <br />
44
42
 
45
43
  ---
@@ -123,92 +121,15 @@ import 'add-to-calendar-button';
123
121
  ```
124
122
 
125
123
  Based on your framework/library, you might need to make minor adjustments to the respective config.
126
- Find the details for the most common ones below.
127
-
128
- <br />
129
124
 
130
- #### Angular
131
-
132
- At the `app.module.ts`, import `CUSTOM_ELEMENTS_SCHEMA` from `@angular/core` and add the following to the `@NgModule` block:
133
-
134
- ```javascript
135
- @NgModule({
136
- //(...),
137
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
138
- })
139
- ```
125
+ Find detailed installation guides for the most common ones, like React, Angular, Vue, Svelte, or Astro at [add-to-calendar-button.com/#installation](https://add-to-calendar-button.com/#installation).
140
126
 
141
127
  <br />
142
128
 
143
- #### React
144
-
145
- **Option A:**
146
-
147
- With basic React projects, the web component works out-of-the-box.
148
-
149
- If you are working with TypeScript or other stricter setups, you would need to define a respective global JSX interface.
150
-
151
- ```typescript
152
- declare global {
153
- namespace JSX {
154
- interface IntrinsicElements {
155
- ['add-to-calendar-button']: CustomElement<AddToCalendarButton>;
156
- }
157
- }
158
- }
159
- ```
160
-
161
- **Option B:**
162
-
163
- If this does not work OR if you want to keep it more convenient, you should use [the official Add to Calendar Button React Wrapper (click here)](https://github.com/add2cal/add-to-calendar-button-react).
164
-
165
- This approach also enables you to provide object and array type props as objects and arrays.
166
- Find all further information within the wrapper repository's Readme file.
167
-
168
- <br />
169
-
170
- #### Vue 3
171
-
172
- In the `vite.config.js/ts`, add the following compiler option to treat all tags with a dash as custom elements and get rid of the warning. Anything else works out-of-the-box.
173
-
174
- ```javascript
175
- compilerOptions: {
176
- isCustomElement: (tag) => tag.includes('-')
177
- }
178
- ```
179
-
180
- If you want to be more precise, you can also write something like `tag.startsWith('add-')` to apply this rule only to tags starting with "add-".
181
-
182
- <br />
183
-
184
- #### Svelte
185
-
186
- Works out-of-the-box. Nice!
129
+ ---
187
130
 
188
131
  <br />
189
132
 
190
- #### Astro
191
-
192
- For Astro as well as other SSR setups, you might want to include the script from the CDN rather than working with the npm package!
193
-
194
- If you still want to go for the npm way, you would need to add something like this to your page (instead of the import statement):
195
-
196
- ```javascript
197
- <script type="module" hoist>
198
- const observer = new IntersectionObserver((entries) => {
199
- for (const entry of entries) {
200
- if (!entry.isIntersecting) continue;
201
- observer.disconnect();
202
- import('../../node_modules/add-to-calendar-button/dist/module/index.js');
203
- }
204
- });
205
- const instances = document.querySelectorAll('add-to-calendar-button');
206
- for (const instance of instances) observer.observe(instance);
207
- </script>
208
- ```
209
-
210
- <br /><br />
211
-
212
133
  ## 🎛️ Configuration
213
134
 
214
135
  A button can be easily created by using the respective custom element.
@@ -269,6 +190,17 @@ A time zone is not required, but recommended.
269
190
 
270
191
  <br />
271
192
 
193
+ ## 🤗 Support it!
194
+
195
+ You like this project? It would be awesome if you would support it, so it lives on!
196
+
197
+ - ⭐ [Star the repository](#) in order to stay up-to-date and save it for later!
198
+ - 📣 Spread the word! On Twitter/X, Medium, Discord, Facebook, ...
199
+ - ✍️ Leave a review at [ProductHunt](https://www.producthunt.com/products/add-to-calendar-button-generator/reviews).
200
+ - 💌 Send us some positive feedback at the [discussion board](https://github.com/add2cal/add-to-calendar-button/discussions).
201
+
202
+ <br />
203
+
272
204
  ## ⚡ Changelog
273
205
 
274
206
  ![npm Version](https://img.shields.io/npm/v/add-to-calendar-button?label=current%20version&style=for-the-badge)
@@ -324,6 +256,8 @@ In doubt, simply ask and we find a way. :)
324
256
  <a href="https://github.com/bryan-brancotte"><img src="https://avatars.githubusercontent.com/u/11556772?v=4" title="bryan-brancotte" width="60" height="60"></a>
325
257
  <a href="https://github.com/nticaric"><img src="https://avatars.githubusercontent.com/u/824840?v=4" title="nticaric" width="60" height="60"></a>
326
258
  <a href="https://github.com/Ortovoxx"><img src="https://avatars.githubusercontent.com/u/56805259?v=4" title="Ortovoxx" width="60" height="60"></a>
259
+ <a href="https://github.com/purushu007"><img src="https://avatars.githubusercontent.com/u/70796763?v=4" title="Purushu" width="60" height="60"></a>
260
+ <a href="https://github.com/cabello"><img src="https://avatars.githubusercontent.com/u/60936?v=4" title="Danilo Cabello" width="60" height="60"></a>
327
261
  <a href="https://github.com/Goudarz"><img src="https://avatars.githubusercontent.com/u/3191949?v=4" title="Goudarz" width="60" height="60"></a>
328
262
  <a href="https://github.com/ragnarkurm"><img src="https://avatars.githubusercontent.com/u/5205088?v=4" title="Ragnar Kurm" width="60" height="60"></a>
329
263
  <a href="https://github.com/emilebosch"><img src="https://avatars.githubusercontent.com/u/303135?v=4" title="emilebosch" width="60" height="60"></a>