@partbot/grid-garage 0.1.0 → 0.1.2

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
@@ -63,6 +63,8 @@ import {
63
63
  ```html
64
64
  <script src="https://unpkg.com/@partbot/grid-garage@latest/dist/js/vehicle-garage.js"></script>
65
65
 
66
+ <button type="button" data-garage-trigger>Garage</button>
67
+
66
68
  <vehicle-garage
67
69
  data-api-key="YOUR_API_KEY"
68
70
  data-store="your-store-handle"
@@ -70,7 +72,8 @@ import {
70
72
  data-theme-color="#2352d9"
71
73
  data-radius="0px"
72
74
  data-button-color="#111111"
73
- data-trigger-label="Garage"
75
+ data-hide-default-button="true"
76
+ data-trigger-selector="[data-garage-trigger]"
74
77
  ></vehicle-garage>
75
78
  ```
76
79
 
@@ -80,6 +83,12 @@ The custom element exposes:
80
83
  - `close()`
81
84
  - `toggle()`
82
85
 
86
+ Use `data-trigger-label` when rendering the built-in trigger button. Use
87
+ `data-hide-default-button="true"` with `data-trigger-selector` when a theme
88
+ already has its own trigger element. The selector can target any page element,
89
+ for example `#garage-button` or `[data-garage-trigger]`; matching elements call
90
+ `toggle()` when clicked.
91
+
83
92
  ## Props
84
93
 
85
94
  Core props:
@@ -94,6 +103,10 @@ Core props:
94
103
  - `defaultTab`
95
104
  - `garageLimit`
96
105
 
106
+ Web component-only attributes:
107
+
108
+ - `data-trigger-selector`
109
+
97
110
  Theme props:
98
111
 
99
112
  - `themeColor`