react-battery-level 1.0.2 → 1.0.3
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/README.md +1 -2
- package/dist/index.js +2 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,6 @@ function App() {
|
|
|
31
31
|
<BatteryLevel
|
|
32
32
|
width="250"
|
|
33
33
|
gauge={75}
|
|
34
|
-
gaugeColor="#34C759"
|
|
35
34
|
isCharging
|
|
36
35
|
borderStyles={{
|
|
37
36
|
color: '#000',
|
|
@@ -52,7 +51,7 @@ export default App;
|
|
|
52
51
|
| `width` | `number` \| `string` | `"150"` | Optional. The width of the battery icon. |
|
|
53
52
|
| `height` | `number` \| `string` | `"100%"` | Optional. The height of the battery icon. |
|
|
54
53
|
| `gauge` | `number` | None | Required. The charge level of the battery (0-100). |
|
|
55
|
-
| `gaugeColor` | `string` | `"#
|
|
54
|
+
| `gaugeColor` | `string` | `"#34C759"` | Optional. The color of the battery fill. |
|
|
56
55
|
| `isCharging` | `boolean` | `false` | Optional. Indicates if the battery is charging. |
|
|
57
56
|
| `showPercentage` | `boolean` | `false` | Optional. Shows the battery percentage inside the SVG. |
|
|
58
57
|
| `borderStyles` | `object` | `{}` | Optional. Styling for the border. |
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
1
|
var __assign = (this && this.__assign) || function () {
|
|
4
2
|
__assign = Object.assign || function(t) {
|
|
5
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -11,9 +9,9 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
9
|
};
|
|
12
10
|
return __assign.apply(this, arguments);
|
|
13
11
|
};
|
|
14
|
-
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
13
|
var BatteryLevel = function (_a) {
|
|
16
|
-
var _b = _a.width, width = _b === void 0 ? '150' : _b, _c = _a.height, height = _c === void 0 ? '100%' : _c, gauge = _a.gauge, _d = _a.gaugeColor, gaugeColor = _d === void 0 ? '#
|
|
14
|
+
var _b = _a.width, width = _b === void 0 ? '150' : _b, _c = _a.height, height = _c === void 0 ? '100%' : _c, gauge = _a.gauge, _d = _a.gaugeColor, gaugeColor = _d === void 0 ? '#34C759' : _d, _e = _a.isCharging, isCharging = _e === void 0 ? false : _e, _f = _a.lightningStyles, lightningStyles = _f === void 0 ? {} : _f, _g = _a.showPercentage, showPercentage = _g === void 0 ? false : _g, _h = _a.percentageStyles, percentageStyles = _h === void 0 ? {} : _h, _j = _a.borderStyles, borderStyles = _j === void 0 ? {} : _j;
|
|
17
15
|
var BATTERY_WIDTH = 42;
|
|
18
16
|
var BATTERY_HEIGHT = 22;
|
|
19
17
|
var BATTERY_X = 1;
|