|
|
|
@ -18,10 +18,10 @@ const CustomSwitch = ({ |
|
|
|
|
setValue(!value); |
|
|
|
|
register.onChange({ target: { name: register.name, value: !value } }); |
|
|
|
|
}} |
|
|
|
|
className={`${className} flex border border-blue-500 relative ${ |
|
|
|
|
className={`${className} flex border relative w-full ${ |
|
|
|
|
values |
|
|
|
|
? "rounded h-full min-h-[50px]" |
|
|
|
|
: " rounded-full h-9 aspect-[1/2]" |
|
|
|
|
? "rounded-md h-full min-h-[50px]" |
|
|
|
|
: " rounded-md h-9 aspect-[1/2]" |
|
|
|
|
}`}
|
|
|
|
|
> |
|
|
|
|
<input |
|
|
|
@ -40,21 +40,20 @@ const CustomSwitch = ({ |
|
|
|
|
: "h-[89%] rounded-full aspect-square" |
|
|
|
|
}`}
|
|
|
|
|
></div> |
|
|
|
|
|
|
|
|
|
{values ? ( |
|
|
|
|
<div className=" w-[98%] h-[90%] flex flex-row-reverse right-[1%] top-[5%] z-10 absolute text-color19"> |
|
|
|
|
<div className=" w-[98%] h-[90%] flex flex-row-reverse right-[1%] top-[5%] z-10 absolute text-white"> |
|
|
|
|
<div |
|
|
|
|
className={ |
|
|
|
|
" w-1/2 h-full flex items-center justify-center cursor-pointer " + |
|
|
|
|
(value ? "text-white" : "") |
|
|
|
|
" w-1/2 h-full flex items-center justify-center cursor-pointer text-xs" + |
|
|
|
|
(value ? "text-[#2483E1]" : "") |
|
|
|
|
} |
|
|
|
|
> |
|
|
|
|
{values[1]} |
|
|
|
|
</div> |
|
|
|
|
<div |
|
|
|
|
className={ |
|
|
|
|
" w-1/2 h-full flex items-center justify-center cursor-pointer " + |
|
|
|
|
(!value ? "text-white" : "") |
|
|
|
|
" w-1/2 h-full flex items-center justify-center cursor-pointer text-xs" + |
|
|
|
|
(!value ? "text-[#2483E1]" : "") |
|
|
|
|
} |
|
|
|
|
> |
|
|
|
|
{values[0]} |
|
|
|
|