react-battery-level 1.0.2 → 1.1.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/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` | `"#6EF47A"` | Optional. The color of the battery fill. |
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 ? '#6EF47A' : _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;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-battery-level",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "private": false,
5
5
  "description": "Simple customizable react battery component",
6
6
  "main": "dist/index.js",
@@ -9,7 +9,10 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/rbrbrb7290/react-battery-level"
11
11
  },
12
- "dependencies": {
12
+ "peerDependencies": {
13
+ "react": ">=16.8.0"
14
+ },
15
+ "devDependencies": {
13
16
  "@testing-library/jest-dom": "^5.17.0",
14
17
  "@testing-library/react": "^13.4.0",
15
18
  "@testing-library/user-event": "^13.5.0",
@@ -25,13 +28,13 @@
25
28
  },
26
29
  "license": "MIT",
27
30
  "keywords": [
28
- "battery",
29
- "battery indicator",
30
- "battery level",
31
- "react battery",
32
31
  "react battery level",
33
32
  "react battery gauge",
34
- "react battery indicator"
33
+ "react battery",
34
+ "react battery indicator",
35
+ "battery",
36
+ "battery indicator",
37
+ "battery level"
35
38
  ],
36
39
  "scripts": {
37
40
  "start": "react-scripts start",