gbs-add-block 0.0.15 → 0.0.17
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/package.json
CHANGED
|
@@ -27,6 +27,9 @@ export const DatePicker = ({
|
|
|
27
27
|
const [days, setDays] = useState<any>([]);
|
|
28
28
|
const [selectedDate, setSelectedDate] = useState(initialSelectedDate);
|
|
29
29
|
const [hasMounted, setHasMounted] = useState(false);
|
|
30
|
+
const [showPlaceHolder, setShowPlaceHolder] = useState<string | undefined>(
|
|
31
|
+
placeholder
|
|
32
|
+
);
|
|
30
33
|
|
|
31
34
|
const dateRef = useRef<HTMLDivElement>(null);
|
|
32
35
|
const today = new Date();
|
|
@@ -68,6 +71,7 @@ export const DatePicker = ({
|
|
|
68
71
|
|
|
69
72
|
const selectDate = (date: any) => {
|
|
70
73
|
setSelectedDate(date);
|
|
74
|
+
setShowPlaceHolder(undefined);
|
|
71
75
|
setShowDatepicker(false);
|
|
72
76
|
if (onDateChange) onDateChange(date);
|
|
73
77
|
};
|
|
@@ -126,8 +130,8 @@ export const DatePicker = ({
|
|
|
126
130
|
elements={calender}
|
|
127
131
|
svgClass={"stroke-black fill-none dark:stroke-white"}
|
|
128
132
|
/>
|
|
129
|
-
{
|
|
130
|
-
<span className="text-gray-500">{
|
|
133
|
+
{showPlaceHolder ? (
|
|
134
|
+
<span className="text-gray-500">{showPlaceHolder}</span>
|
|
131
135
|
) : (
|
|
132
136
|
<span>{selectedDate.toLocaleDateString()}</span>
|
|
133
137
|
)}
|
|
@@ -7,20 +7,28 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
type AestheticProcessingAnimationProps = {
|
|
11
|
+
progressPercentage: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const AestheticProcessingAnimation = ({
|
|
15
|
+
progressPercentage,
|
|
16
|
+
}: AestheticProcessingAnimationProps) => {
|
|
11
17
|
return (
|
|
12
18
|
<div className="w-full max-w-md mx-auto p-2">
|
|
13
19
|
<div className="w-full h-1 bg-gray-200 rounded-full overflow-hidden">
|
|
14
20
|
<div className="h-full w-1/3 bg-black rounded-full animate-processing"></div>
|
|
15
21
|
</div>
|
|
16
22
|
<p className="text-xs mt-2 text-center">
|
|
17
|
-
Uploading in Progress
|
|
23
|
+
Uploading in Progress {Math.floor(progressPercentage)}%, Please Wait...
|
|
18
24
|
</p>
|
|
19
25
|
</div>
|
|
20
26
|
);
|
|
21
27
|
};
|
|
22
28
|
|
|
23
|
-
const AestheticProcessingAnimationWithStyles = (
|
|
29
|
+
const AestheticProcessingAnimationWithStyles = ({
|
|
30
|
+
progressPercentage,
|
|
31
|
+
}: AestheticProcessingAnimationProps) => (
|
|
24
32
|
<>
|
|
25
33
|
<style jsx global>{`
|
|
26
34
|
@keyframes processing {
|
|
@@ -35,7 +43,7 @@ const AestheticProcessingAnimationWithStyles = () => (
|
|
|
35
43
|
animation: processing 2s ease-in-out infinite;
|
|
36
44
|
}
|
|
37
45
|
`}</style>
|
|
38
|
-
<AestheticProcessingAnimation />
|
|
46
|
+
<AestheticProcessingAnimation progressPercentage={progressPercentage} />
|
|
39
47
|
</>
|
|
40
48
|
);
|
|
41
49
|
|