@streamlayer/react-ui 0.42.0 → 0.43.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.
Files changed (64) hide show
  1. package/lib/{icon-exit-6a55bb8f.js → icon-exit-d3f9fc80.js} +1 -1
  2. package/lib/{index-7045fbb2.js → index-7f3361f2.js} +1 -1
  3. package/lib/index.js +36 -39
  4. package/lib/ui/app/Features/Gamification/Leaderboard.js +1 -1
  5. package/lib/ui/app/Features/Gamification/Question.js +31 -31
  6. package/lib/ui/app/Features/Gamification/Tabs.js +1 -1
  7. package/lib/ui/app/Features/Gamification/index.js +26 -21
  8. package/lib/ui/app/Features/Highlights/Insight.js +1 -1
  9. package/lib/ui/app/Features/Highlights/index.js +1 -1
  10. package/lib/ui/app/Features/index.js +13 -8
  11. package/lib/ui/app/Notifications/index.js +1 -1
  12. package/lib/ui/app/masters.js +12 -8
  13. package/lib/ui/demo/Gamification.js +21 -24
  14. package/lib/ui/demo/Highlights.js +8 -11
  15. package/lib/ui/demo/Login.js +4 -5
  16. package/lib/ui/demo/components/Insight.js +1 -1
  17. package/lib/ui/demo/components/Leaderboard.js +1 -1
  18. package/lib/ui/demo/components/Question.js +49 -64
  19. package/lib/ui/demo/components/index.js +20 -23
  20. package/lib/ui/demo/index.js +8 -11
  21. package/lib/ui/gamification/common-header/index.js +8 -8
  22. package/lib/ui/gamification/detailed-insight/index.js +1 -1
  23. package/lib/ui/gamification/leaderboard-item-detail/index.js +1 -1
  24. package/lib/ui/gamification/onboarding/index.js +19 -19
  25. package/lib/ui/gamification/user-statistics/index.js +31 -31
  26. package/lib/ui/gamification/vote/header/index.js +20 -0
  27. package/lib/ui/gamification/vote/index.js +42 -35
  28. package/lib/ui/gamification/vote/styles.js +12 -11
  29. package/lib/ui/gamification/vote/{components/voting-option → vote-option}/index.js +1 -1
  30. package/lib/ui/gamification/vote/win-bar/index.d.ts +10 -0
  31. package/lib/ui/gamification/vote/win-bar/index.js +24 -0
  32. package/lib/ui/gamification/vote/win-bar/styles.d.ts +8 -0
  33. package/lib/ui/gamification/vote/win-bar/styles.js +50 -0
  34. package/lib/ui/icons/index.js +1 -1
  35. package/lib/ui/login/index.js +15 -17
  36. package/lib/ui/notifications/decorator.js +1 -1
  37. package/lib/ui/notifications/index.js +1 -1
  38. package/lib/ui/notifications/notification/index.js +1 -1
  39. package/lib/ui/notifications/notification/question-inapp/index.js +8 -8
  40. package/lib/ui/show-in/index.js +1 -1
  41. package/lib/ui/theme/constants.d.ts +4 -0
  42. package/lib/ui/theme/constants.js +2 -0
  43. package/lib/ui/timer/index.d.ts +9 -0
  44. package/lib/ui/timer/index.js +37 -0
  45. package/package.json +12 -12
  46. package/lib/ui/gamification/vote/components/voting-header/components/points/index.d.ts +0 -6
  47. package/lib/ui/gamification/vote/components/voting-header/components/points/index.js +0 -13
  48. package/lib/ui/gamification/vote/components/voting-header/components/points/styles.d.ts +0 -6
  49. package/lib/ui/gamification/vote/components/voting-header/components/points/styles.js +0 -32
  50. package/lib/ui/gamification/vote/components/voting-header/components/timer/index.d.ts +0 -8
  51. package/lib/ui/gamification/vote/components/voting-header/components/timer/index.js +0 -28
  52. package/lib/ui/gamification/vote/components/voting-header/components/timer/styles.d.ts +0 -2
  53. package/lib/ui/gamification/vote/components/voting-header/components/timer/styles.js +0 -8
  54. package/lib/ui/gamification/vote/components/voting-header/index.d.ts +0 -12
  55. package/lib/ui/gamification/vote/components/voting-header/index.js +0 -44
  56. package/lib/ui/gamification/vote/components/voting-header/styles.d.ts +0 -11
  57. package/lib/ui/gamification/vote/components/voting-header/styles.js +0 -57
  58. package/lib/ui/gamification/vote/vote-header/index.js +0 -20
  59. /package/lib/ui/gamification/vote/{vote-header → header}/index.d.ts +0 -0
  60. /package/lib/ui/gamification/vote/{vote-header → header}/styles.d.ts +0 -0
  61. /package/lib/ui/gamification/vote/{vote-header → header}/styles.js +0 -0
  62. /package/lib/ui/gamification/vote/{components/voting-option → vote-option}/index.d.ts +0 -0
  63. /package/lib/ui/gamification/vote/{components/voting-option → vote-option}/styles.d.ts +0 -0
  64. /package/lib/ui/gamification/vote/{components/voting-option → vote-option}/styles.js +0 -0
@@ -0,0 +1,37 @@
1
+ import { jsx as R } from "react/jsx-runtime";
2
+ import { styled as E } from "@linaria/react";
3
+ import { useState as O, useCallback as n } from "react";
4
+ import { CountdownCircleTimer as S } from "react-countdown-circle-timer";
5
+ import { COLORS as t } from "../theme/constants.js";
6
+ const f = [t.PRIMARY_GREEN1, t.SECONDARY_RED1, t.SECONDARY_RED1], _ = [10, 10, 0], A = E.div`
7
+ font-weight: var(--font-weight-default);
8
+ `, D = t.SECONDARY_GREEN6, c = t.SECONDARY_RED3, N = t.NEUTRALS_GRAY3, T = ({ isPlaying: l = !0, duration: s = 30, onTimerExpired: o }) => {
9
+ const [i, r] = O(s > 10 ? D : c), C = ({ remainingTime: e }) => /* @__PURE__ */ R(A, { children: e }), m = n(() => {
10
+ o == null || o(), r(N);
11
+ }, [o, r]), a = n(
12
+ (e) => {
13
+ e === 10 && r(c);
14
+ },
15
+ [r]
16
+ );
17
+ return /* @__PURE__ */ R(
18
+ S,
19
+ {
20
+ isPlaying: l,
21
+ duration: s,
22
+ colors: f,
23
+ colorsTime: _,
24
+ size: 32,
25
+ strokeWidth: 2,
26
+ trailStrokeWidth: 2,
27
+ trailColor: i,
28
+ onComplete: m,
29
+ onUpdate: a,
30
+ children: C
31
+ }
32
+ );
33
+ };
34
+ export {
35
+ A as RemainingTime,
36
+ T as Timer
37
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -27,16 +27,16 @@
27
27
  ],
28
28
  "peerDependencies": {
29
29
  "@streamlayer/sl-eslib": "^5.52.0",
30
- "@streamlayer/feature-gamification": "^0.18.1",
31
- "@streamlayer/sdk-web": "^0.28.3",
32
- "@streamlayer/sdk-web-anonymous-auth": "^0.10.12",
33
- "@streamlayer/sdk-web-api": "^0.0.6",
34
- "@streamlayer/sdk-web-core": "^0.15.0",
35
- "@streamlayer/sdk-web-features": "^0.10.6",
36
- "@streamlayer/sdk-web-interfaces": "^0.18.4",
37
- "@streamlayer/sdk-web-notifications": "^0.10.3",
38
- "@streamlayer/sdk-web-storage": "^0.3.6",
39
- "@streamlayer/sdk-web-types": "^0.16.4"
30
+ "@streamlayer/feature-gamification": "^0.18.2",
31
+ "@streamlayer/sdk-web": "^0.28.4",
32
+ "@streamlayer/sdk-web-anonymous-auth": "^0.10.13",
33
+ "@streamlayer/sdk-web-api": "^0.0.7",
34
+ "@streamlayer/sdk-web-core": "^0.15.1",
35
+ "@streamlayer/sdk-web-features": "^0.10.7",
36
+ "@streamlayer/sdk-web-interfaces": "^0.18.5",
37
+ "@streamlayer/sdk-web-notifications": "^0.10.4",
38
+ "@streamlayer/sdk-web-storage": "^0.3.7",
39
+ "@streamlayer/sdk-web-types": "^0.16.5"
40
40
  },
41
41
  "nx": {
42
42
  "implicitDependencies": [
@@ -73,6 +73,6 @@
73
73
  "vite-plugin-svgr": "^4.1.0",
74
74
  "vite-svg-loader": "^4.0.0",
75
75
  "vite-tsconfig-paths": "^4.2.1",
76
- "@streamlayer/react": "^0.24.1"
76
+ "@streamlayer/react": "^0.24.3"
77
77
  }
78
78
  }
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface PointsProps {
3
- points: number;
4
- }
5
- export declare const Points: React.FC<PointsProps>;
6
- export {};
@@ -1,13 +0,0 @@
1
- import { jsxs as n, jsx as i } from "react/jsx-runtime";
2
- import { Container as r, Title as t, PointContainer as e, Point as l, PointLabel as c } from "./styles.js";
3
- import "@linaria/react";
4
- const s = ({ points: o }) => /* @__PURE__ */ n(r, { children: [
5
- /* @__PURE__ */ i(t, { children: "YOU WON" }),
6
- /* @__PURE__ */ n(e, { children: [
7
- /* @__PURE__ */ i(l, { children: o }),
8
- /* @__PURE__ */ i(c, { children: "PTS" })
9
- ] })
10
- ] });
11
- export {
12
- s as Points
13
- };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
- export declare const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
- export declare const PointContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
- export declare const Point: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
6
- export declare const PointLabel: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
@@ -1,32 +0,0 @@
1
- import { styled as i } from "@linaria/react";
2
- const n = i.div`
3
- display: flex;
4
- flex-direction: column;
5
- align-items: flex-end;
6
- margin-right: 10px;
7
- font-weight: 700;
8
- `, e = i.div`
9
- color: rgba(255, 255, 255, 0.8);
10
- font-size: 8px;
11
- line-height: 12px;
12
- text-align: right;
13
- `, o = i.div`
14
- text-align: right;
15
- `, l = i.span`
16
- color: rgba(255, 255, 255, 0.9);
17
- font-size: 14px;
18
- line-height: 16px;
19
- margin-right: 2px;
20
- `, r = i.span`
21
- color: white;
22
- font-size: 10px;
23
- font-weight: 600;
24
- line-height: 16px;
25
- `;
26
- export {
27
- n as Container,
28
- l as Point,
29
- o as PointContainer,
30
- r as PointLabel,
31
- e as Title
32
- };
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- interface TimerProps {
3
- isPlaying?: boolean;
4
- duration?: number;
5
- setTimeToExpire: (flag: boolean) => void;
6
- }
7
- export declare const Timer: React.FC<TimerProps>;
8
- export {};
@@ -1,28 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { useEffect as R } from "react";
3
- import { CountdownCircleTimer as m } from "react-countdown-circle-timer";
4
- import { COLORS as r } from "../../../../../../theme/constants.js";
5
- import { RemainingTime as s } from "./styles.js";
6
- import "@linaria/react";
7
- const E = [r.BLUE_PRIMARY, r.GREEN_1, r.RED_1], T = [10, 6, 0], _ = 30, l = 32, I = 4, O = 0, h = ({ isPlaying: i = !0, duration: n = _, setTimeToExpire: o }) => {
8
- const c = ({ remainingTime: t }) => /* @__PURE__ */ e(s, { style: { color: t ? "inherit" : void 0 }, children: t });
9
- return R(() => {
10
- o(!1);
11
- }, [o]), /* @__PURE__ */ e(
12
- m,
13
- {
14
- isPlaying: i,
15
- duration: n,
16
- colors: E,
17
- colorsTime: T,
18
- size: l,
19
- strokeWidth: I,
20
- trailStrokeWidth: O,
21
- onComplete: () => o(!0),
22
- children: c
23
- }
24
- );
25
- };
26
- export {
27
- h as Timer
28
- };
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const RemainingTime: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,8 +0,0 @@
1
- import { styled as o } from "@linaria/react";
2
- const e = o.div`
3
- color: var(--color-red-2);
4
- font-size: 12px;
5
- `;
6
- export {
7
- e as RemainingTime
8
- };
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import { QuestionType } from '@streamlayer/sdk-web-types';
3
- export interface VotingHeaderProps {
4
- points: number;
5
- questionAnswered: boolean;
6
- questionAnsweredCorrectly?: boolean;
7
- logo: string;
8
- questionType: QuestionType;
9
- closeQuestion: () => void;
10
- setTimeToExpire: (flag: boolean) => void;
11
- }
12
- export declare const VotingHeader: React.FC<VotingHeaderProps>;
@@ -1,44 +0,0 @@
1
- import { jsxs as N, jsx as M, Fragment as O } from "react/jsx-runtime";
2
- import { QuestionType as j } from "@streamlayer/sdk-web-types";
3
- import { i as E } from "../../../../../icon-exit-6a55bb8f.js";
4
- import { Points as z } from "./components/points/index.js";
5
- import { Timer as k } from "./components/timer/index.js";
6
- import { Container as C, RightBlock as w, Interactive as Y, ReactionIconWrap as c, ReactionIcon as y, ExitBtn as o, ExitIcon as r, Logo as a } from "./styles.js";
7
- import "./components/points/styles.js";
8
- import "@linaria/react";
9
- import "react";
10
- import "react-countdown-circle-timer";
11
- import "../../../../theme/constants.js";
12
- import "./components/timer/styles.js";
13
- const n = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgdmlld0JveD0iMCAwIDIyIDIyIiBmaWxsPSJub25lIj4KICAgIDxwYXRoIGQ9Ik01LjUgMi43ODg2N1YxMi40MTM3QzUuNSAxMy4xNzI5IDQuODg0MjYgMTMuNzUgNC4xMjUgMTMuNzVIMS4zNzVDMC42MTU3NDIgMTMuNzUgMCAxMy4xMzQzIDAgMTIuNDEzN1YyLjgyNzM0QzAgMi4wNjgwOCAwLjYxNTc0MiAxLjQ5MTAyIDEuMzc1IDEuNDkxMDJINC4xMjVDNC44ODU1NSAxLjQxMzY3IDUuNSAxLjk5Mzc1IDUuNSAyLjc4ODY3Wk0yMiAxMi4zNzA3QzIyIDEzLjUwOTQgMjEuMDc3IDE0LjQzMjMgMTkuOTM3NSAxNC40MzIzSDEzLjY0MjZDMTQuNjIxIDE2LjA2MTMgMTUuMTI1OSAxNy45MDc3IDE1LjEyNTkgMTguNTU4MkMxNS4xMjUgMTkuNTcxNCAxNC4zMzAxIDIwLjYyNSAxMi45OTggMjAuNjI1QzEwLjI4NTQgMjAuNjI1IDExLjg2NTQgMTcuMzUyOSA4LjM0ODgzIDE0LjU0MDZMNy42NDg0NCAxMy45ODJDNy4xNDE0MSAxMy41NzM4IDYuODgzNTkgMTIuOTc2NiA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zUwNCA2LjkyMzA4IDkuMjU3ODEgNi45MjMwOCA5QzYuOTIzMDggOC43NTY1MSA2Ljk1NzkzIDguNTQyODYgNy4wMjc2NCA4LjM1OTA1QzcuMDk3MzYgOC4xNzUyNCA3LjIyMzU2IDguMDAyMTcgNy40MDYyNSA3LjgzOTg0QzcuNjYxMDYgNy42NDQxIDcuODg5NDIgNy40MTczMiA4LjA5MTM1IDcuMTU5NTFDOC42MzQ2MiA3LjEzNTYzIDkuMTUyNjQgNy4wMjk0MSA5LjY0NTQzIDYuODQwODJDMTAuMTM4MiA2LjY1MjIzIDEwLjU1NDEgNi40MTk0OSAxMC44OTMgNi4xNDI1OEMxMS4yMzIgNS44NjU2NyAxMS41MDEyIDUuNTU1MzQgMTEuNzAwNyA1LjIxMTU5QzExLjkwMDIgNC44Njc4NCAxMiA0LjUyNjQ4IDEyIDQuMTg3NVpNNS4wNzAzMyA1LjM4NDkxTDYuMDM4MyA0Ljg3NTAzTDcuMDA2MjcgNS4zODQ5MUw2LjgyMTQgNC4zMDQ5N0w3LjYwNDUxIDMuNTQwMTZMNi41MjIyOCAzLjM4MjZMNi4wMzgzIDIuNDAwMDNMNS41NTQzMSAzLjM4MjZMNC40NzIwOSAzLjU0MDE2TDUuMjU1MTkgNC4zMDQ5N0w1LjA3MDMzIDUuMzg0OTFaIiBmaWxsPSJ3aGl0ZSIvPgogICAgPC9nPgogIDwvc3ZnPgo=", R = ({
14
- logo: g,
15
- points: T,
16
- questionAnswered: D,
17
- questionAnsweredCorrectly: A,
18
- questionType: I,
19
- closeQuestion: L,
20
- setTimeToExpire: i
21
- }) => {
22
- const x = !D && I !== j.PREDICTION, u = D && I === j.TRIVIA, S = u && A, Q = u && !A, U = D && I === j.PREDICTION;
23
- return /* @__PURE__ */ N(C, { children: [
24
- /* @__PURE__ */ N(w, { children: [
25
- /* @__PURE__ */ N(Y, { children: [
26
- x && /* @__PURE__ */ M(k, { setTimeToExpire: i }),
27
- S && /* @__PURE__ */ N(O, { children: [
28
- /* @__PURE__ */ M(z, { points: T }),
29
- /* @__PURE__ */ M(c, { isSuccess: !0, children: /* @__PURE__ */ M(y, { alt: "reaction-icon", src: t }) })
30
- ] }),
31
- Q && /* @__PURE__ */ N(O, { children: [
32
- /* @__PURE__ */ M(z, { points: 0 }),
33
- /* @__PURE__ */ M(c, { isSuccess: !1, children: /* @__PURE__ */ M(y, { alt: "reaction-icon", src: n }) })
34
- ] }),
35
- U && /* @__PURE__ */ M(z, { points: T })
36
- ] }),
37
- /* @__PURE__ */ M(o, { onClick: L, children: /* @__PURE__ */ M(r, { alt: "exit-icon", src: E }) })
38
- ] }),
39
- g && /* @__PURE__ */ M(a, { src: g })
40
- ] });
41
- };
42
- export {
43
- R as VotingHeader
44
- };
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
- export declare const Logo: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
4
- export declare const RightBlock: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
- export declare const ExitBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
6
- export declare const ExitIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
7
- export declare const Interactive: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
8
- export declare const ReactionIconWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
9
- isSuccess: boolean;
10
- }>;
11
- export declare const ReactionIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
@@ -1,57 +0,0 @@
1
- import { styled as t } from "@linaria/react";
2
- const n = t.div`
3
- box-sizing: border-box;
4
- background-color: transparent;
5
- color: var(--color-white);
6
- display: flex;
7
- flex-direction: row-reverse;
8
- justify-content: space-between;
9
- padding: 0px 16px;
10
- align-items: center;
11
- min-height: 40px;
12
- `, o = t.img`
13
- width: 60px;
14
- height: 80%;
15
- `, r = t.div`
16
- display: flex;
17
- align-items: center;
18
- `, c = t.button`
19
- border: none;
20
- outline: none;
21
- background-color: transparent;
22
- border-radius: 50%;
23
- padding: 0px;
24
- width: 24px;
25
- height: 24px;
26
- margin-left: 25px;
27
- cursor: pointer;
28
- `, d = t.img`
29
- width: 24px;
30
- height: 24px;
31
- `, p = t.div`
32
- display: flex;
33
- align-items: center;
34
- padding: 4px 0px;
35
- margin-left: 10px;
36
- `, a = t.div`
37
- background-color: ${(e) => e.isSuccess ? "#f1be1c" : "#da3732"};
38
- width: 32px;
39
- height: 32px;
40
- border-radius: 50%;
41
- display: flex;
42
- justify-content: center;
43
- align-items: center;
44
- `, s = t.img`
45
- width: 20px;
46
- height: 20px;
47
- `;
48
- export {
49
- n as Container,
50
- c as ExitBtn,
51
- d as ExitIcon,
52
- p as Interactive,
53
- o as Logo,
54
- s as ReactionIcon,
55
- a as ReactionIconWrap,
56
- r as RightBlock
57
- };
@@ -1,20 +0,0 @@
1
- import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
- import { QuestionTypeData as i } from "../../constants.js";
3
- import { Container as p, QuestionTypeWrap as s, QuestionTypeIcon as m, QuestionTypeTitle as c, CloseButton as l, CloseIcon as a } from "./styles.js";
4
- import "@streamlayer/sdk-web-types";
5
- import "@linaria/react";
6
- import "../../../icons/index.js";
7
- import "react";
8
- const Q = ({ type: t, close: r }) => {
9
- const e = i[t];
10
- return e ? /* @__PURE__ */ n(p, { children: [
11
- /* @__PURE__ */ n(s, { children: [
12
- /* @__PURE__ */ o(m, { name: e.iconName }),
13
- /* @__PURE__ */ o(c, { children: e.label })
14
- ] }),
15
- /* @__PURE__ */ o(l, { onClick: r, children: /* @__PURE__ */ o(a, { name: "icon-cross" }) })
16
- ] }) : null;
17
- };
18
- export {
19
- Q as VoteHeader
20
- };