few-ticket-widget 1.0.18 → 1.0.19

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.
@@ -18,32 +18,26 @@
18
18
  buttonTextColor=""
19
19
  } = options;
20
20
 
21
-
22
- // const iframeURL =
23
- // baseUrl +
24
- // '/checkout/' +
25
- // encodeURIComponent(eventSlug) +
26
- // '?theme=' +
27
- // encodeURIComponent(theme);
21
+
28
22
 
29
23
  const params = new URLSearchParams({
30
24
  theme,
31
25
  });
32
26
 
33
27
  if (backgroundColor) {
34
- params.set('backgroundColor', backgroundColor?.replace('#', ''));
35
- }
36
- if (textColor) {
37
- params.set('textColor', textColor?.replace('#', ''));
38
- }
39
-
40
- if (buttonColor) {
41
- params.set('buttonColor', buttonColor?.replace('#', ''));
42
- }
43
- if (buttonTextColor) {
44
- params.set('buttonTextColor', buttonTextColor?.replace('#', ''));
45
- }
28
+ params.set('backgroundColor', backgroundColor);
29
+ }
30
+ if (textColor) {
31
+ params.set('textColor', textColor);
32
+ }
46
33
 
34
+ if (buttonColor) {
35
+ params.set('buttonColor', buttonColor);
36
+ }
37
+ if (buttonTextColor) {
38
+ params.set('buttonTextColor', buttonTextColor);
39
+ }
40
+
47
41
  const iframeURL = `${baseUrl}/checkout/${encodeURIComponent(eventSlug)}?${params.toString()}`;
48
42
 
49
43
  const iframe = document.createElement('iframe');
@@ -1,7 +1,5 @@
1
1
  import React from 'react';
2
2
 
3
- // import React from 'react';
4
-
5
3
  var TicketWidget = function TicketWidget(_ref) {
6
4
  var eventSlug = _ref.eventSlug,
7
5
  _ref$theme = _ref.theme,
@@ -23,16 +21,16 @@ var TicketWidget = function TicketWidget(_ref) {
23
21
  theme: theme
24
22
  });
25
23
  if (backgroundColor) {
26
- params.set('backgroundColor', backgroundColor.replace('#', ''));
24
+ params.set('backgroundColor', backgroundColor);
27
25
  }
28
26
  if (textColor) {
29
- params.set('textColor', textColor.replace('#', ''));
27
+ params.set('textColor', textColor);
30
28
  }
31
29
  if (buttonColor) {
32
- params.set('buttonColor', buttonColor.replace('#', ''));
30
+ params.set('buttonColor', buttonColor);
33
31
  }
34
32
  if (buttonTextColor) {
35
- params.set('buttonTextColor', buttonTextColor.replace('#', ''));
33
+ params.set('buttonTextColor', buttonTextColor);
36
34
  }
37
35
  var iframeURL = "".concat(baseUrl, "/checkout/").concat(encodeURIComponent(eventSlug), "?").concat(params.toString());
38
36
  return /*#__PURE__*/React.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "few-ticket-widget",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "main": "dist/react-ticket-widget.js",
5
5
  "files": [
6
6
  "dist"