@ammarkhalidfarooq/dashboard-package 0.3.11 → 0.3.13
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 +38 -38
- package/dist/index.cjs.js +3 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3 -2
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
# @ammarkhalidfarooq/dashboard-package
|
|
2
|
-
|
|
3
|
-
A reusable React Dashboard component library.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @ammarkhalidfarooq/dashboard-package
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```jsx
|
|
14
|
-
import React from "react";
|
|
15
|
-
import { Dashboard } from "@ammarkhalidfarooq/dashboard-package";
|
|
16
|
-
|
|
17
|
-
const App = () => {
|
|
18
|
-
return <Dashboard />;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default App;
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Development
|
|
25
|
-
|
|
26
|
-
To preview the component locally:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
npm run dev
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
To build the package:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npm run build
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
The build outputs both ESM and CommonJS bundles in the `dist` folder.
|
|
1
|
+
# @ammarkhalidfarooq/dashboard-package
|
|
2
|
+
|
|
3
|
+
A reusable React Dashboard component library.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @ammarkhalidfarooq/dashboard-package
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
import React from "react";
|
|
15
|
+
import { Dashboard } from "@ammarkhalidfarooq/dashboard-package";
|
|
16
|
+
|
|
17
|
+
const App = () => {
|
|
18
|
+
return <Dashboard />;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default App;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Development
|
|
25
|
+
|
|
26
|
+
To preview the component locally:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm run dev
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
To build the package:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm run build
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The build outputs both ESM and CommonJS bundles in the `dist` folder.
|
package/dist/index.cjs.js
CHANGED
|
@@ -4741,7 +4741,7 @@ function formatNumber(num) {
|
|
|
4741
4741
|
}
|
|
4742
4742
|
|
|
4743
4743
|
var OverallSection = function OverallSection(_ref) {
|
|
4744
|
-
var
|
|
4744
|
+
var _Number;
|
|
4745
4745
|
var _ref$apiData = _ref.apiData,
|
|
4746
4746
|
apiData = _ref$apiData === void 0 ? {} : _ref$apiData,
|
|
4747
4747
|
primaryCharts = _ref.primaryCharts,
|
|
@@ -4791,10 +4791,11 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
4791
4791
|
}
|
|
4792
4792
|
return charts;
|
|
4793
4793
|
};
|
|
4794
|
+
console.log("API DATA", apiData);
|
|
4794
4795
|
var metricInfo = {
|
|
4795
4796
|
"Total Raised": {
|
|
4796
4797
|
value: "$".concat(formatNumber(apiData === null || apiData === void 0 ? void 0 : apiData.totalRaisedCard)) || "$240.9K",
|
|
4797
|
-
subValue: "".concat(apiData === null || apiData === void 0
|
|
4798
|
+
subValue: "".concat((_Number = Number(apiData === null || apiData === void 0 ? void 0 : apiData.totalRaisedPrev)) === null || _Number === void 0 ? void 0 : _Number.toFixed(2), "% vs ").concat(dateName) || "18% vs last month",
|
|
4798
4799
|
label: "Total Revenue",
|
|
4799
4800
|
icon: iconsMaterial.PaidOutlined
|
|
4800
4801
|
},
|