sprint-asia-custom-component 0.1.160 → 0.1.162
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 +146 -3971
- package/package.json +1 -1
- package/src/components/searchdropdown/index.js +2 -2
- package/src/components/textinput/index.js +13 -7
- package/src/templates/index.js +2 -0
package/package.json
CHANGED
|
@@ -41,7 +41,7 @@ const SearchDropdown = ({
|
|
|
41
41
|
} relative cursor-pointer border-t border-b border-l rounded-tl-md rounded-bl-md`}
|
|
42
42
|
onClick={() => setIsOpen(!isOpen)}
|
|
43
43
|
>
|
|
44
|
-
<div className="flex items-center bg-white rounded-tl-md rounded-bl-md" style={{minWidth:"144px"}}>
|
|
44
|
+
<div className="flex items-center bg-white rounded-tl-md rounded-bl-md" style={{ minWidth: "144px" }}>
|
|
45
45
|
<p className="flex items-center w-full py-2.5 text-left pl-4 pr-4 bg-white rounded-md font-bold text-sm text-neutral300">
|
|
46
46
|
{filterDropdown.option}
|
|
47
47
|
</p>
|
|
@@ -55,7 +55,7 @@ const SearchDropdown = ({
|
|
|
55
55
|
aria-orientation="vertical"
|
|
56
56
|
aria-labelledby="options-menu"
|
|
57
57
|
>
|
|
58
|
-
<div className="px-1 py-2 max-h-
|
|
58
|
+
<div className="px-1 py-2 max-h-48 overflow-y-auto">
|
|
59
59
|
{options?.length > 0 ? (
|
|
60
60
|
options.map((option, index) => (
|
|
61
61
|
<div
|
|
@@ -3,6 +3,7 @@ import { PiEyeClosedLight, PiEye, PiInfo } from "react-icons/pi";
|
|
|
3
3
|
|
|
4
4
|
const TextInput = ({
|
|
5
5
|
title = "",
|
|
6
|
+
rightComponent = null,
|
|
6
7
|
leftIcon = null,
|
|
7
8
|
rightIcon = null,
|
|
8
9
|
placeholder = "",
|
|
@@ -16,7 +17,7 @@ const TextInput = ({
|
|
|
16
17
|
rightAdornment,
|
|
17
18
|
leftAdornment,
|
|
18
19
|
minimum,
|
|
19
|
-
maximum
|
|
20
|
+
maximum,
|
|
20
21
|
}) => {
|
|
21
22
|
const [isFocused, setIsFocused] = useState(false);
|
|
22
23
|
const [showPassword, setShowPassword] = useState(false);
|
|
@@ -35,12 +36,17 @@ const TextInput = ({
|
|
|
35
36
|
|
|
36
37
|
return (
|
|
37
38
|
<div className={`w-full ${className}`}>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
<div className="flex justify-between w-full items-center">
|
|
40
|
+
{title && (
|
|
41
|
+
<div className="flex">
|
|
42
|
+
<p className="text-sm font-normal text-black mb-1">{title}</p>
|
|
43
|
+
{isRequired && <p className="text-sm font-normal text-danger500 ml-1">*</p>}
|
|
44
|
+
</div>
|
|
45
|
+
)}
|
|
46
|
+
{
|
|
47
|
+
rightComponent && <div>{rightComponent}</div>
|
|
48
|
+
}
|
|
49
|
+
</div>
|
|
44
50
|
|
|
45
51
|
<div className="relative rounded-md">
|
|
46
52
|
<section className="absolute inset-y-0 left-0 pl-2 flex items-center justify-center gap-2">
|
package/src/templates/index.js
CHANGED
|
@@ -1598,6 +1598,8 @@ const Templates = () => {
|
|
|
1598
1598
|
|
|
1599
1599
|
<div className="m-9"></div>
|
|
1600
1600
|
<p className="text-black font-bold text-2xl text-center py-2">Text Input</p>
|
|
1601
|
+
<TextInput title="Default Input" placeholder="Type something..." value={inputValue} onChange={setInputValue} rightComponent={<div className="flex items-center mb-2"><Switch /><p className="ml-2">Auto</p></div>}/>
|
|
1602
|
+
|
|
1601
1603
|
<TextInput title="Default Input" placeholder="Type something..." value={inputValue} onChange={setInputValue} />
|
|
1602
1604
|
|
|
1603
1605
|
<TextInput
|