@everymatrix/casino-slider 1.24.7 → 1.25.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-slider",
3
- "version": "1.24.7",
3
+ "version": "1.25.0",
4
4
  "main": "dist/casino-slider.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "7d07b195e7119200519062f519ff0712a2227c39"
38
+ "gitHead": "668756b576877a7c33679408591fa2b7f93e0f37"
39
39
  }
@@ -23,6 +23,9 @@
23
23
  export let lang:string = '';
24
24
  export let activeindex:string = '0';
25
25
  export let showsubgroups:string = 'false';
26
+ export let categoriesicon:string = 'false';
27
+ export let lobbyiconimage:string = '';
28
+ export let mygamesiconimage:string = '';
26
29
 
27
30
  setupI18n({ withLocale: 'en', translations: {}});
28
31
 
@@ -207,6 +210,16 @@
207
210
  });
208
211
  }
209
212
 
213
+ const handleSrc = (category) => {
214
+ let icon = '';
215
+ if(category.id==='LOBBY') {
216
+ icon = lobbyiconimage;
217
+ } else if(category.id==='MYGAMES') {
218
+ icon = mygamesiconimage;
219
+ }
220
+ return category.icon || icon;
221
+ }
222
+
210
223
  onMount(() => {
211
224
  if ("ontouchstart" in document.documentElement) {
212
225
  document.documentElement.className += " touch-device";
@@ -249,6 +262,9 @@
249
262
  {location == 'headerMain' ? '' : 'SecondaryMenu'}"
250
263
  part="CarouselItem"
251
264
  on:click={e => { handleClick(category, index, null, null, 'main'); e.preventDefault()}}>
265
+ <div class="CategoryIcon">
266
+ <img class="CategoryIconImg {categoriesicon === 'true' ? '' : 'DisplayNone' }" src="{handleSrc(category)}">
267
+ </div>
252
268
  {#if location === 'headerMain'}
253
269
  <a href="#">{category.label}</a>
254
270
  {:else}
@@ -360,7 +376,7 @@
360
376
  left: auto;
361
377
  top: auto;
362
378
  opacity: 1;
363
- transition: opacity 0.5s linear, top 0.5s;
379
+ transition: opacity 0.5s linear;
364
380
  }
365
381
  .CarouselItems li:focus-within > ul {
366
382
  left: auto;
@@ -429,6 +445,7 @@
429
445
  li {
430
446
  display: inline-block;
431
447
  text-align: left;
448
+ padding: 7px 10px;
432
449
  & > a {
433
450
  position: relative;
434
451
  }
@@ -439,7 +456,6 @@
439
456
  }
440
457
  a {
441
458
  display: block;
442
- padding: 7px 10px;
443
459
  color: var(--emfe-w-categories-typography, var(--emfe-w-color-white, #FFFFFF));
444
460
  text-decoration: none;
445
461
  white-space: nowrap;
@@ -574,4 +590,14 @@
574
590
  }
575
591
  }
576
592
 
593
+ .CategoryIconImg {
594
+ height: 20px;
595
+ margin: 0 auto;
596
+ display: block;
597
+ }
598
+
599
+ .DisplayNone {
600
+ display: none;
601
+ }
602
+
577
603
  </style>