@justeattakeaway/pie-button 0.36.0 → 0.37.0

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
@@ -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
- // React
55
- // For React, you will need to import our React specific component build
56
- // Which wraps the web component using the @lit-labs/react package
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
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { CSSResult } from 'lit';
2
2
  import type { LitElement } from 'lit';
3
3
  import type { PropertyValues } from 'lit';
4
- import type { TemplateResult } from 'lit-html';
4
+ import type { TemplateResult } from 'lit';
5
5
 
6
6
  export declare interface ButtonProps {
7
7
  /**
@@ -118,6 +118,12 @@ export declare class PieButton extends LitElement implements ButtonProps {
118
118
  private _simulateNativeButtonClick;
119
119
  private _handleClick;
120
120
  private _handleFormKeyDown;
121
+ /**
122
+ * Template for the loading state
123
+ *
124
+ * @private
125
+ */
126
+ private renderSpinner;
121
127
  render(): TemplateResult<1>;
122
128
  focus(): void;
123
129
  static styles: CSSResult;