@livelike/embet 0.0.13 → 0.0.14

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.0.14 (November 22, 2021)
2
+
3
+ - Added `widgetWidthPercentage`, `parentContainer, `disableResizing` properties to widget's custom_data
4
+ - Removed dynamic font size setting
5
+ - Moved ResizeObserver from embet-widgets to the individual widget elements to allow for resizing in single tag widgets
6
+
1
7
  ## 0.0.13 (November 22, 2021)
2
8
 
3
9
  - Removed hard coded livelike-title color
package/README.md CHANGED
@@ -85,13 +85,16 @@ options: [{
85
85
  custom_data: JSON stringified object
86
86
 
87
87
  custom_data: {
88
- palce_bet_url: string;
88
+ place_bet_url: string;
89
89
  type: 'LIVE SPREAD' | 'LIVE MONEYLINE' | 'LIVE TOTAL';
90
90
  sponsors: [{logo_url: string, name: string}];
91
91
  betDetails: [{bet: string; description: string;}],
92
92
  customCss: string,
93
93
  customStyles: string,
94
94
  widgetHeight: string | number,
95
+ widgetWidthPercentage: string | number,
96
+ parentContainer: string,
97
+ disableResizing: boolean,
95
98
  widgetVariation: 'bar' | 'square' | 'inline'
96
99
  theme: {
97
100
  widgets: {
@@ -157,6 +160,30 @@ widgetHeight = '50%'
157
160
 
158
161
  The `widgetVariation` property can be used control the layout of the widgets. The three options are `bar`, `square`, and `inline`.
159
162
 
163
+ ### About the parentContainer property
164
+
165
+ The `parentContainer` optional property is the selector of an element that is a parent of a widget. It is used to calculate styles for resizing. If `parentContainer` is not provided, `document.body` will be used instead.
166
+
167
+ `parentContainer: "#parent-container-id"`
168
+
169
+ `parentContainer: ".parent-container-class"`
170
+
171
+ ### About the widgetWidthPercentage property
172
+
173
+ The `widgetWidthPercentage is the optional property that is a percentage decimal that works with the `parentContainer` property.
174
+
175
+ For example
176
+
177
+ `widgetWidthPercentage: "0.5"`
178
+
179
+ will set the widget's width at 50% of the parent container.
180
+
181
+ If not provided, the default value is `0.3`.
182
+
183
+ ### About the disableResizing property
184
+
185
+ Set `disableResizing` optional property to `true` to prevent the widget from resizing. Default is false.
186
+
160
187
  ### About the betDetails property
161
188
  In the `betDetails` property of the `custom_data` stringified object, the `description` properties must match with your `options` array `description` properties.
162
189
 
@@ -205,6 +232,8 @@ The `bet: +120` will match the `options` object with `description: Astros`
205
232
  place_bet_url: "#",
206
233
  type: "LIVE MONEYLINE",
207
234
  widgetVariation: "bar",
235
+ parentContainer: ".parent-container-class",
236
+ widgetWidthPercentage: "0.5",
208
237
  sponsors: [
209
238
  {
210
239
  logo_url: