@fullsession.io/fs-feedback-widget 1.7.2 → 1.7.4

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.
@@ -1,96 +1,94 @@
1
- <script>
2
- import { icons_1, icons_2, icons_3, icons_4 } from "./reactionSvgs/icons.js";
3
- export let name;
4
- export let focusable = false;
5
- export let emotIconType;
6
- export let width = "40px";
7
- export let height = "40px";
8
- let emotIcons =
9
- emotIconType == "0"
10
- ? icons_1
11
- : emotIconType == "1"
12
- ? icons_2
13
- : emotIconType == "2"
14
- ? icons_3
15
- : emotIconType == "3"
16
- ? icons_4
17
- : null;
18
- let icons = [
19
- {
20
- box: 50,
21
- name: "love",
22
- svg: emotIcons[0],
23
- },
24
- {
25
- box: 50,
26
- name: "unSelectedLove",
27
- svg: emotIcons[1],
28
- },
29
- {
30
- box: 50,
31
- name: "like",
32
- svg: emotIcons[2],
33
- },
34
- {
35
- box: 50,
36
- name: "unSelectedLike",
37
- svg: emotIcons[3],
38
- },
39
- {
40
- box: 50,
41
- name: "neutral",
42
- svg: emotIcons[4],
43
- },
44
- {
45
- box: 50,
46
- name: "unSelectedNeutral",
47
- svg: emotIcons[5],
48
- },
49
- {
50
- box: 50,
51
- name: "dislike",
52
- svg: emotIcons[6],
53
- },
54
- {
55
- box: 50,
56
- name: "unSelectedDislike",
57
- svg: emotIcons[7],
58
- },
59
-
60
- {
61
- box: 50,
62
- name: "hate",
63
- svg: emotIcons[8],
64
- },
65
- {
66
- box: 50,
67
- name: "unSelectedHate",
68
- svg: emotIcons[9],
69
- },
70
- ];
71
- let displayIcon = icons.find((e) => e.name === name);
72
- </script>
73
-
74
- {#if emotIconType === "2"}
75
- <svg
76
- class={$$props.class}
77
- {focusable}
78
- {width}
79
- {height}
80
- viewBox="0 0 {displayIcon.box} {displayIcon.box - 1}"
81
- >
82
- <g transform={"translate(-3, -3)"}>
83
- {@html displayIcon.svg}
84
- </g>
85
- </svg>
86
- {:else}
87
- <svg
88
- class={$$props.class}
89
- {focusable}
90
- {width}
91
- {height}
92
- viewBox="0 0 {displayIcon.box} {displayIcon.box - 1}"
93
- >
94
- {@html displayIcon.svg}
95
- </svg>
96
- {/if}
1
+ <script>
2
+ import { icons_1, icons_2, icons_3, icons_4 } from "./reactionSvgs/icons.js";
3
+ export let name;
4
+ export let focusable = false;
5
+ export let emotIconType;
6
+ export let width = "40px";
7
+ export let height = "40px";
8
+ let emotIcons =
9
+ emotIconType == "0"
10
+ ? icons_1
11
+ : emotIconType == "1"
12
+ ? icons_2
13
+ : emotIconType == "2"
14
+ ? icons_3
15
+ : null;
16
+ let icons = [
17
+ {
18
+ box: 50,
19
+ name: "love",
20
+ svg: emotIcons[0],
21
+ },
22
+ {
23
+ box: 50,
24
+ name: "unSelectedLove",
25
+ svg: emotIcons[1],
26
+ },
27
+ {
28
+ box: 50,
29
+ name: "like",
30
+ svg: emotIcons[2],
31
+ },
32
+ {
33
+ box: 50,
34
+ name: "unSelectedLike",
35
+ svg: emotIcons[3],
36
+ },
37
+ {
38
+ box: 50,
39
+ name: "neutral",
40
+ svg: emotIcons[4],
41
+ },
42
+ {
43
+ box: 50,
44
+ name: "unSelectedNeutral",
45
+ svg: emotIcons[5],
46
+ },
47
+ {
48
+ box: 50,
49
+ name: "dislike",
50
+ svg: emotIcons[6],
51
+ },
52
+ {
53
+ box: 50,
54
+ name: "unSelectedDislike",
55
+ svg: emotIcons[7],
56
+ },
57
+
58
+ {
59
+ box: 50,
60
+ name: "hate",
61
+ svg: emotIcons[8],
62
+ },
63
+ {
64
+ box: 50,
65
+ name: "unSelectedHate",
66
+ svg: emotIcons[9],
67
+ },
68
+ ];
69
+ let displayIcon = icons.find((e) => e.name === name);
70
+ </script>
71
+
72
+ {#if emotIconType === "2"}
73
+ <svg
74
+ class={$$props.class}
75
+ {focusable}
76
+ {width}
77
+ {height}
78
+ viewBox="0 0 {displayIcon.box} {displayIcon.box - 1}"
79
+ >
80
+ <g transform={"translate(-3, -3)"}>
81
+ {@html displayIcon.svg}
82
+ </g>
83
+ </svg>
84
+ {:else}
85
+ <svg
86
+ class={$$props.class}
87
+ {focusable}
88
+ {width}
89
+ {height}
90
+ viewBox="0 0 {displayIcon.box} {displayIcon.box - 1}"
91
+ >
92
+ {@html displayIcon.svg}
93
+ </svg>
94
+ {/if}