@cashub/ui 0.34.2 → 0.35.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/Tab/TabList.js CHANGED
@@ -139,7 +139,7 @@ const TabList = _ref => {
139
139
  })
140
140
  }));
141
141
  };
142
- const Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n border-bottom: var(--border-width) solid var(--border-color);\n margin-bottom: var(--spacing);\n overflow: hidden;\n\n ", "\n\n ", "\n"])), _ref2 => {
142
+ const Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n border-bottom: var(--border-width) solid var(--border-color);\n margin-bottom: var(--spacing);\n\n ", "\n\n ", "\n"])), _ref2 => {
143
143
  let {
144
144
  $wrap
145
145
  } = _ref2;
package/map/GoogleMap.js CHANGED
@@ -29,7 +29,8 @@ const GoogleMap = _ref => {
29
29
  data = {
30
30
  defaultPosition: null,
31
31
  position: null,
32
- locations: []
32
+ locations: [],
33
+ message: null
33
34
  },
34
35
  geoFence = false,
35
36
  geoFenceOptions = {},
@@ -102,6 +103,7 @@ const GoogleMap = _ref => {
102
103
  defaultPosition: data.defaultPosition,
103
104
  position: data.position,
104
105
  locations: validLocations,
106
+ message: data.message,
105
107
  bounds: validBounds,
106
108
  geoFence: geoFence,
107
109
  geoFenceOptions: geoFenceOptions,
@@ -120,6 +122,7 @@ const Map = _ref2 => {
120
122
  defaultPosition,
121
123
  position,
122
124
  locations,
125
+ message,
123
126
  bounds,
124
127
  geoFence,
125
128
  geoFenceOptions,
@@ -392,6 +395,23 @@ const Map = _ref2 => {
392
395
  };
393
396
  }
394
397
  }, [map, geoFence, geoFenceOptions.latitude, geoFenceOptions.longitude, geoFenceOptions.radius, geoFenceOptions.minRadius, geoFenceOptions.editable, geoFenceOptions.eventHandlers]);
398
+
399
+ // show message
400
+ (0, _react.useEffect)(() => {
401
+ if (map && message) {
402
+ const messageContainer = document.createElement('p');
403
+ messageContainer.style.margin = 'var(--spacing-s)';
404
+ messageContainer.style.padding = 'var(--spacing-xs)';
405
+ messageContainer.style.boxShadow = 'var(--box-shadow)';
406
+ messageContainer.style.border = 'none';
407
+ messageContainer.style.borderRadius = 'var(--border-radius-s)';
408
+ messageContainer.style.cursor = 'pointer';
409
+ messageContainer.style.backgroundColor = 'rgb(255, 255, 255)';
410
+ messageContainer.style.fontSize = 'var(--font-body1)';
411
+ messageContainer.textContent = message;
412
+ map.controls[window.google.maps.ControlPosition.CENTER].push(messageContainer);
413
+ }
414
+ }, [map, message]);
395
415
  (0, _react.useEffect)(() => {
396
416
  if (ref.current && !map) {
397
417
  setMap(new window.google.maps.Map(ref.current, {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cashub/ui",
3
- "version": "0.34.2",
3
+ "version": "0.35.0",
4
4
  "private": false,
5
5
  "author": "CasHUB Team",
6
6
  "description": "CasHUB UI components library",