@esportsplus/ui 0.23.0 → 0.24.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.
@@ -14,15 +14,29 @@ export default template.factory((attributes, content) => {
14
14
  class='tooltip-content ${`tooltip-content--${tooltipContentDirection}`}'
15
15
  ${tooltipContent && omit(tooltipContent, OMIT_TOOLTIP_CONTENT)}
16
16
  >
17
- ${options.map((o) => html `
18
- <div
19
- class='link --width-full'
20
- ${omit(o, OMIT_OPTION)}
21
- ${option}
22
- >
23
- ${o.content}
24
- </div>
25
- `)}
17
+ ${options.map((o) => {
18
+ if (o.href) {
19
+ return html `
20
+ <a
21
+ class='link --width-full'
22
+ target='_blank'
23
+ ${omit(o, OMIT_OPTION)}
24
+ ${option}
25
+ >
26
+ ${o.content}
27
+ </a>
28
+ `;
29
+ }
30
+ return html `
31
+ <div
32
+ class='link --width-full'
33
+ ${omit(o, OMIT_OPTION)}
34
+ ${option}
35
+ >
36
+ ${o.content}
37
+ </div>
38
+ `;
39
+ })}
26
40
  </div>
27
41
  `);
28
42
  });
package/package.json CHANGED
@@ -48,7 +48,7 @@
48
48
  "private": false,
49
49
  "sideEffects": false,
50
50
  "type": "module",
51
- "version": "0.23.0",
51
+ "version": "0.24.0",
52
52
  "scripts": {
53
53
  "build": "run-s build:vite build:ts",
54
54
  "build:ts": "tsc && tsc-alias",
@@ -36,15 +36,30 @@ export default template.factory<A>(
36
36
  class='tooltip-content ${`tooltip-content--${tooltipContentDirection}`}'
37
37
  ${tooltipContent && omit(tooltipContent, OMIT_TOOLTIP_CONTENT)}
38
38
  >
39
- ${options.map((o) => html`
40
- <div
41
- class='link --width-full'
42
- ${omit(o, OMIT_OPTION)}
43
- ${option}
44
- >
45
- ${o.content}
46
- </div>
47
- `)}
39
+ ${options.map((o) => {
40
+ if (o.href) {
41
+ return html`
42
+ <a
43
+ class='link --width-full'
44
+ target='_blank'
45
+ ${omit(o, OMIT_OPTION)}
46
+ ${option}
47
+ >
48
+ ${o.content}
49
+ </a>
50
+ `;
51
+ }
52
+
53
+ return html`
54
+ <div
55
+ class='link --width-full'
56
+ ${omit(o, OMIT_OPTION)}
57
+ ${option}
58
+ >
59
+ ${o.content}
60
+ </div>
61
+ `;
62
+ })}
48
63
  </div>
49
64
  `
50
65
  );