gbs-add-block 0.0.18 → 0.0.19
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
|
@@ -124,14 +124,18 @@ export const DatePicker = ({
|
|
|
124
124
|
<button
|
|
125
125
|
type="button"
|
|
126
126
|
onClick={toggleDatepicker}
|
|
127
|
-
className="border p-2 rounded w-full flex
|
|
127
|
+
className="border p-2 rounded w-full flex items-center gap-2 dark:text-white"
|
|
128
128
|
>
|
|
129
129
|
<Icon
|
|
130
|
+
dimensions={{ width: "30", height: "30" }}
|
|
130
131
|
elements={calender}
|
|
131
132
|
svgClass={"stroke-black fill-none dark:stroke-white"}
|
|
132
133
|
/>
|
|
133
134
|
{showPlaceHolder ? (
|
|
134
|
-
<
|
|
135
|
+
<div className="flex flex-col text-left">
|
|
136
|
+
<span className="text-gray-500 text-xs">{showPlaceHolder}</span>
|
|
137
|
+
<div className="text-sm">{new Date().toLocaleDateString()}</div>
|
|
138
|
+
</div>
|
|
135
139
|
) : (
|
|
136
140
|
<span>{selectedDate.toLocaleDateString()}</span>
|
|
137
141
|
)}
|
|
@@ -246,10 +250,8 @@ export const DatePicker = ({
|
|
|
246
250
|
key={index}
|
|
247
251
|
onClick={() => !isDisabled && selectDate(day)}
|
|
248
252
|
disabled={isDisabled}
|
|
249
|
-
className={`text-center p-1 w-8 h-8 cursor-pointer rounded-
|
|
250
|
-
isSelected
|
|
251
|
-
? "bg-blue-500 text-white hover:bg-blue-600"
|
|
252
|
-
: ""
|
|
253
|
+
className={`text-center p-1 w-8 h-8 cursor-pointer rounded-md hover:bg-gray-200 transition duration-150 ease-in-out ${
|
|
254
|
+
isSelected ? "bg-black text-white hover:bg-gray-800" : ""
|
|
253
255
|
} ${
|
|
254
256
|
isDisabled
|
|
255
257
|
? "bg-gray-100 text-gray-400 cursor-not-allowed"
|
|
@@ -266,7 +268,7 @@ export const DatePicker = ({
|
|
|
266
268
|
<button
|
|
267
269
|
type="button"
|
|
268
270
|
onClick={goToToday}
|
|
269
|
-
className="text-
|
|
271
|
+
className="text-black hover:text-blue-600 transition duration-150 ease-in-out"
|
|
270
272
|
>
|
|
271
273
|
Today
|
|
272
274
|
</button>
|
|
@@ -5,14 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import React
|
|
8
|
+
import React from "react";
|
|
9
9
|
import { twMerge } from "tailwind-merge";
|
|
10
10
|
import type { ModalProps } from "./types";
|
|
11
11
|
|
|
12
12
|
export const Modal = ({
|
|
13
13
|
showModal = false,
|
|
14
14
|
modalTitle = "Modal Title",
|
|
15
|
-
autoclose = false,
|
|
16
15
|
modalClass = "fixed z-10 overflow-y-auto inset-0 flex items-center justify-center bg-gray-500 bg-opacity-75 transition-opacity",
|
|
17
16
|
modalContentClass = "bg-white m-10 md:w-[80vh] rounded-xl",
|
|
18
17
|
classModalContent = "",
|
|
@@ -20,23 +19,14 @@ export const Modal = ({
|
|
|
20
19
|
classModalTitle = "",
|
|
21
20
|
children,
|
|
22
21
|
}: ModalProps) => {
|
|
23
|
-
const [show, setShow] = useState(showModal);
|
|
24
|
-
|
|
25
|
-
const autoCloseHandler = () => {
|
|
26
|
-
if (autoclose) {
|
|
27
|
-
setShow(false);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
22
|
return (
|
|
32
23
|
<>
|
|
33
|
-
{
|
|
24
|
+
{showModal && (
|
|
34
25
|
<div
|
|
35
26
|
className={modalClass}
|
|
36
27
|
aria-labelledby="modal-title"
|
|
37
28
|
role="dialog"
|
|
38
29
|
aria-modal="true"
|
|
39
|
-
onClick={autoCloseHandler}
|
|
40
30
|
>
|
|
41
31
|
<div
|
|
42
32
|
className={twMerge(modalContentClass, classModalContent)}
|