mertani-web-toolkit 0.1.67 → 0.1.69

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.
@@ -33,6 +33,8 @@
33
33
  disabled?: boolean;
34
34
  tooltip?: string;
35
35
  tooltipPosition?: 'top' | 'bottom' | 'left' | 'right' | 'auto';
36
+ tooltipBgColor?: string;
37
+ tooltipTextColor?: string;
36
38
 
37
39
  // Any
38
40
  class?: string;
@@ -63,6 +65,8 @@
63
65
  disabled = false,
64
66
  tooltip = '',
65
67
  tooltipPosition = 'auto',
68
+ tooltipBgColor = 'var(--color-bg-inverse)',
69
+ tooltipTextColor = 'var(--color-text-inverse)',
66
70
 
67
71
  class: className = '',
68
72
  style: customStyle = '',
@@ -294,7 +298,10 @@
294
298
 
295
299
  {#if tooltip && showTooltip}
296
300
  <div class="btn-tooltip-container tooltip-{actualPosition}">
297
- <div class="btn-tooltip">
301
+ <div
302
+ class="btn-tooltip"
303
+ style={`--tooltip-bg-color: ${tooltipBgColor}; --tooltip-text-color: ${tooltipTextColor};`}
304
+ >
298
305
  {tooltip}
299
306
  <div class="tooltip-arrow"></div>
300
307
  </div>
@@ -22,6 +22,8 @@ interface Props extends Omit<HTMLButtonAttributes, 'type'> {
22
22
  disabled?: boolean;
23
23
  tooltip?: string;
24
24
  tooltipPosition?: 'top' | 'bottom' | 'left' | 'right' | 'auto';
25
+ tooltipBgColor?: string;
26
+ tooltipTextColor?: string;
25
27
  class?: string;
26
28
  style?: string;
27
29
  }
@@ -115,8 +115,8 @@
115
115
  }
116
116
 
117
117
  .btn-tooltip {
118
- background-color: var(--color-bg-inverse);
119
- color: var(--color-text-inverse);
118
+ background-color: var(--tooltip-bg-color);
119
+ color: var(--tooltip-text-color);
120
120
  padding: 8px 14px;
121
121
  border-radius: 10px;
122
122
  font-size: 13px;
@@ -131,7 +131,7 @@
131
131
  position: absolute;
132
132
  width: 8px;
133
133
  height: 8px;
134
- background-color: var(--color-bg-inverse);
134
+ background-color: var(--tooltip-bg-color);
135
135
  transform: rotate(45deg);
136
136
  }
137
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mertani-web-toolkit",
3
- "version": "0.1.67",
3
+ "version": "0.1.69",
4
4
  "homepage": "https://storybook.mertani.com/",
5
5
  "scripts": {
6
6
  "dev": "vite dev",