@ammarkhalidfarooq/dashboard-package 0.3.10 → 0.3.12
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 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3 -1
- 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,6 +4741,7 @@ function formatNumber(num) {
|
|
|
4741
4741
|
}
|
|
4742
4742
|
|
|
4743
4743
|
var OverallSection = function OverallSection(_ref) {
|
|
4744
|
+
var _apiData$totalRaisedP;
|
|
4744
4745
|
var _ref$apiData = _ref.apiData,
|
|
4745
4746
|
apiData = _ref$apiData === void 0 ? {} : _ref$apiData,
|
|
4746
4747
|
primaryCharts = _ref.primaryCharts,
|
|
@@ -4790,10 +4791,11 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
4790
4791
|
}
|
|
4791
4792
|
return charts;
|
|
4792
4793
|
};
|
|
4794
|
+
console.log("API DATA", apiData);
|
|
4793
4795
|
var metricInfo = {
|
|
4794
4796
|
"Total Raised": {
|
|
4795
4797
|
value: "$".concat(formatNumber(apiData === null || apiData === void 0 ? void 0 : apiData.totalRaisedCard)) || "$240.9K",
|
|
4796
|
-
subValue: "".concat(apiData === null || apiData === void 0 ? void 0 :
|
|
4798
|
+
subValue: "".concat(apiData === null || apiData === void 0 || (_apiData$totalRaisedP = apiData.totalRaisedPrev) === null || _apiData$totalRaisedP === void 0 ? void 0 : _apiData$totalRaisedP.toFixed(2), "% vs ").concat(dateName) || "18% vs last month",
|
|
4797
4799
|
label: "Total Revenue",
|
|
4798
4800
|
icon: iconsMaterial.PaidOutlined
|
|
4799
4801
|
},
|