sprint-asia-custom-component 0.1.133 → 0.1.134
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/dist/index.js
CHANGED
|
@@ -23905,14 +23905,11 @@
|
|
|
23905
23905
|
|
|
23906
23906
|
const DescriptionFile = ({
|
|
23907
23907
|
title = "Title",
|
|
23908
|
-
link
|
|
23908
|
+
link,
|
|
23909
|
+
fileName
|
|
23909
23910
|
}) => {
|
|
23910
|
-
const
|
|
23911
|
-
const
|
|
23912
|
-
return match ? match.toLowerCase() : "file";
|
|
23913
|
-
};
|
|
23914
|
-
const fileExtension = getFileExtension(link);
|
|
23915
|
-
const getFileIcon = ext => {
|
|
23911
|
+
const getFileIcon = fileName => {
|
|
23912
|
+
const ext = fileName.split(".").pop().toLowerCase();
|
|
23916
23913
|
switch (ext) {
|
|
23917
23914
|
case "pdf":
|
|
23918
23915
|
return /*#__PURE__*/React__default["default"].createElement(PiFilePdf, {
|
|
@@ -23939,12 +23936,12 @@
|
|
|
23939
23936
|
className: "text-sm font-normal text-black mb-1 py-2"
|
|
23940
23937
|
}, title), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23941
23938
|
className: "flex items-center cursor-pointer"
|
|
23942
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", null, getFileIcon(
|
|
23939
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", null, getFileIcon(fileName || title)), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
23943
23940
|
className: "text-md font-semibold text-base ml-1",
|
|
23944
23941
|
href: link || "#",
|
|
23945
23942
|
target: "_blank",
|
|
23946
23943
|
rel: "noopener noreferrer"
|
|
23947
|
-
},
|
|
23944
|
+
}, fileName || title)));
|
|
23948
23945
|
};
|
|
23949
23946
|
|
|
23950
23947
|
const DropdownCard = ({
|
package/package.json
CHANGED
|
@@ -3,15 +3,10 @@ import { PiFilePdf } from "react-icons/pi";
|
|
|
3
3
|
import { FaFileImage } from "react-icons/fa";
|
|
4
4
|
import { FaFileAlt } from "react-icons/fa";
|
|
5
5
|
|
|
6
|
-
const DescriptionFile = ({ title = "Title", link }) => {
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
return match ? match.toLowerCase() : "file";
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const fileExtension = getFileExtension(link);
|
|
6
|
+
const DescriptionFile = ({ title = "Title", link, fileName }) => {
|
|
7
|
+
const getFileIcon = (fileName) => {
|
|
8
|
+
const ext = fileName.split(".").pop().toLowerCase();
|
|
13
9
|
|
|
14
|
-
const getFileIcon = (ext) => {
|
|
15
10
|
switch (ext) {
|
|
16
11
|
case "pdf":
|
|
17
12
|
return <PiFilePdf className="text-black" size={16} />;
|
|
@@ -28,14 +23,14 @@ const DescriptionFile = ({ title = "Title", link }) => {
|
|
|
28
23
|
<div className="w-full">
|
|
29
24
|
{title && <p className="text-sm font-normal text-black mb-1 py-2">{title}</p>}
|
|
30
25
|
<div className="flex items-center cursor-pointer">
|
|
31
|
-
<div>{getFileIcon(
|
|
26
|
+
<div>{getFileIcon(fileName || title)}</div>
|
|
32
27
|
<a
|
|
33
28
|
className="text-md font-semibold text-base ml-1"
|
|
34
29
|
href={link || "#"}
|
|
35
30
|
target="_blank"
|
|
36
31
|
rel="noopener noreferrer"
|
|
37
32
|
>
|
|
38
|
-
{
|
|
33
|
+
{fileName || title}
|
|
39
34
|
</a>
|
|
40
35
|
</div>
|
|
41
36
|
</div>
|
package/src/templates/index.js
CHANGED
|
@@ -60,6 +60,7 @@ import CellModelFive from "../components/table/listTable/cellmodefive";
|
|
|
60
60
|
import CellModelSix from "../components/table/listTable/cellmodesix";
|
|
61
61
|
import CellModelSeven from "../components/table/listTable/cellmodelseven";
|
|
62
62
|
import CustomPhone from "../components/customphone";
|
|
63
|
+
import DescriptionFile from "../components/description/file";
|
|
63
64
|
|
|
64
65
|
const Templates = () => {
|
|
65
66
|
const [startDate, setStartDate] = useState(null);
|
|
@@ -838,6 +839,14 @@ const Templates = () => {
|
|
|
838
839
|
|
|
839
840
|
return (
|
|
840
841
|
<div>
|
|
842
|
+
<DescriptionFile
|
|
843
|
+
title="Project Brief"
|
|
844
|
+
link={
|
|
845
|
+
"http://192.168.4.224:8080/api/division/files/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJZCI6IjlhOGM4ZTU1LWM3YzctNDEwZS1iNzYwLTVlZWI4NmI4YzVkMyIsImNsaWVudE5hbWUiOiJNYXN0ZXIgQ2xpZW50IiwiZGl2aXNpb25JZCI6IjljMmM2Y2NiLWZlZGUtNDJmZi1hMzc1LTE0ZWNjOTY5OWExMSIsImRpdmlzaW9uTmFtZSI6Ik1hc3RlciBEaXZpc2lvbiIsImV4cCI6MTczNjI2MzI2NSwicm9sZUlkIjoiMTk5ZWMxODItZjBjMy0xMWVlLTkzMzYtZGMxYmExNGE1YmY5IiwidXNlcklkIjoiNjlkNTUwNTUtYmY5NS00YjBkLWJkZWMtYjY1YTI0MWFiNjRmIiwidXNlck5hbWUiOiJoYW5keSBudWdyYWhhIn0.bfqIMzp-htu0-CWDRakgOem-c9Hn_2u6MfqgEMCPq54/61820a4c-f102-4dc1-a8bc-6c2956a333a5.pdf"
|
|
846
|
+
}
|
|
847
|
+
fileName="61820a4c-f102-4dc1-a8bc-6c2956a333a5.pdf"
|
|
848
|
+
/>
|
|
849
|
+
|
|
841
850
|
<div>
|
|
842
851
|
{/* <OutlineButton title="Test" /> */}
|
|
843
852
|
<Header title="Navbar" roleName="System Administrators" dataBalance={10000} />
|