summaryrefslogtreecommitdiff
path: root/src/components/upload/SourceInput.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/upload/SourceInput.tsx')
-rw-r--r--src/components/upload/SourceInput.tsx14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/components/upload/SourceInput.tsx b/src/components/upload/SourceInput.tsx
index c93c4b6..a80092a 100644
--- a/src/components/upload/SourceInput.tsx
+++ b/src/components/upload/SourceInput.tsx
@@ -1,17 +1,21 @@
'use client';
import { Input } from '@/components/ui';
+import React from 'react';
export function SourceInput() {
+ const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
+ if (e.key === 'Enter') {
+ e.preventDefault();
+ }
+ };
+
return (
<div className="flex flex-col gap-2.5 w-full">
<span>ИСТОЧНИК</span>
<Input
+ placeholder="Введите источник"
name="source"
- onKeyDown={(e) => {
- if (e.key === 'Enter') {
- e.preventDefault();
- }
- }}
+ onKeyDown={handleKeyDown}
className="w-full h-10 py-2.5 px-5 border rounded-4xl"
type="text"
/>