@justeattakeaway/pie-switch 0.17.0 → 0.17.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.
Files changed (2) hide show
  1. package/README.md +16 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -42,14 +42,28 @@ For full information on using PIE components as part of an application, check ou
42
42
 
43
43
  ### Importing the component
44
44
 
45
+ #### JavaScript
45
46
  ```js
46
- // default
47
+ // Default – for Native JS Applications, Vue, Angular, Svelte, etc.
47
48
  import { PieSwitch } from '@justeattakeaway/pie-switch';
48
49
 
49
- // react
50
+ // If you don't need to reference the imported object, you can simply
51
+ // import the module which registers the component as a custom element.
52
+ import '@justeattakeaway/pie-switch';
53
+ ```
54
+
55
+ #### React
56
+ ```js
57
+ // React
58
+ // For React, you will need to import our React-specific component build
59
+ // which wraps the web component using @lit-labs/react
50
60
  import { PieSwitch } from '@justeattakeaway/pie-switch/dist/react';
51
61
  ```
52
62
 
63
+ > [!NOTE]
64
+ > When using the React version of the component, please make sure to also
65
+ > include React as a [peer dependency](#peer-dependencies) in your project.
66
+
53
67
 
54
68
  ## Peer Dependencies
55
69
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-switch",
3
3
  "description": "PIE Design System Switch built using Web Components",
4
- "version": "0.17.0",
4
+ "version": "0.17.1",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",