add update contest form

This commit is contained in:
Виталий Лавшонок
2025-12-09 16:54:44 +03:00
parent 4391114dc3
commit 6675bd871e
4 changed files with 141 additions and 123 deletions

View File

@@ -32,8 +32,6 @@ export const DropDownList: React.FC<DropDownListProps> = ({
);
const [active, setActive] = React.useState<boolean>(false);
React.useEffect(() => onChange(value.value), [value]);
const ref = React.useRef<HTMLDivElement>(null);
useClickOutside(ref, () => {
@@ -63,7 +61,7 @@ export const DropDownList: React.FC<DropDownListProps> = ({
<img
src={chevroneDropDownList}
className={cn(
' absolute right-[16px] h-[24px] w-[24px] top-[8.5px] rotate-0 transition-all duration-300 pointer-events-none',
' absolute right-[16px] h-[24px] w-[24px] top-[8.5px] rotate-0 transition-all duration-300 pointer-events-none select-none',
active && ' rotate-180',
)}
/>
@@ -78,7 +76,7 @@ export const DropDownList: React.FC<DropDownListProps> = ({
: 'grid-rows-[0fr] opacity-0',
)}
>
<div className=" overflow-hidden p-[8px]">
<div className=" overflow-hidden p-[8px] border-liquid-background border-solid border-[1px] rounded-[10px]">
<div
className={cn(
' overflow-y-scroll max-h-[200px] thin-scrollbar pr-[8px] ',
@@ -97,6 +95,7 @@ export const DropDownList: React.FC<DropDownListProps> = ({
)}
onClick={() => {
setValue(v);
onChange(v.value);
setActive(false);
}}
>

View File

@@ -18,7 +18,7 @@ const DateInput: React.FC<DateInputProps> = ({
}) => {
return (
<div className={`flex flex-col gap-1 ${className}`}>
<label className="block text-sm font-medium text-gray-700">
<label className="block text-sm font-medium text-liquid-white">
{label}
</label>
<input
@@ -26,7 +26,7 @@ const DateInput: React.FC<DateInputProps> = ({
value={value}
defaultValue={defaultValue}
onChange={(e) => onChange(e.target.value)}
className="mt-1 block w-full rounded-md border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
className="mt-1 block w-full rounded-[10px] sm:text-sm outline-none p-[8px] text-liquid-white cursor-text bg-liquid-lighter"
/>
</div>
);