@justeattakeaway/pie-button 0.36.0 → 0.36.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 +15 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,20 +47,28 @@ For full information on using PIE components as part of an application, check ou
|
|
|
47
47
|
|
|
48
48
|
### Importing the component
|
|
49
49
|
|
|
50
|
+
#### JavaScript
|
|
50
51
|
```js
|
|
51
|
-
// Default – for Native JS Applications, Vue, Angular, Svelte etc.
|
|
52
|
+
// Default – for Native JS Applications, Vue, Angular, Svelte, etc.
|
|
52
53
|
import { PieButton } from '@justeattakeaway/pie-button';
|
|
53
54
|
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
// Note: When using the React version of the component, please make sure
|
|
59
|
-
// you also include React as a dependency in your project as well. See Peer Dependencies section.
|
|
55
|
+
// If you don't need to reference the imported object, you can simply
|
|
56
|
+
// import the module which registers the component as a custom element.
|
|
57
|
+
import '@justeattakeaway/pie-button';
|
|
58
|
+
```
|
|
60
59
|
|
|
60
|
+
#### React
|
|
61
|
+
```js
|
|
62
|
+
// React
|
|
63
|
+
// For React, you will need to import our React-specific component build
|
|
64
|
+
// which wraps the web component using @lit-labs/react
|
|
61
65
|
import { PieButton } from '@justeattakeaway/pie-button/dist/react';
|
|
62
66
|
```
|
|
63
67
|
|
|
68
|
+
> [!NOTE]
|
|
69
|
+
> When using the React version of the component, please make sure to also
|
|
70
|
+
> include React as a [peer dependency](#peer-dependencies) in your project.
|
|
71
|
+
|
|
64
72
|
|
|
65
73
|
## Peer Dependencies
|
|
66
74
|
|