From 2242e32613a14db1e8be81858bd65f4c18233d8b Mon Sep 17 00:00:00 2001 From: l3wdfut4pwr Date: Sun, 3 May 2026 20:01:28 +0300 Subject: minor tags input & source changes --- src/components/upload/SourceInput.tsx | 14 +++++++++----- src/components/upload/TagsInput.tsx | 18 ++++++++++++------ src/components/upload/TagsList.tsx | 4 ++++ 3 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 src/components/upload/TagsList.tsx (limited to 'src/components/upload') 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) => { + if (e.key === 'Enter') { + e.preventDefault(); + } + }; + return (
ИСТОЧНИК { - if (e.key === 'Enter') { - e.preventDefault(); - } - }} + onKeyDown={handleKeyDown} className="w-full h-10 py-2.5 px-5 border rounded-4xl" type="text" /> diff --git a/src/components/upload/TagsInput.tsx b/src/components/upload/TagsInput.tsx index 4dcc595..891d428 100644 --- a/src/components/upload/TagsInput.tsx +++ b/src/components/upload/TagsInput.tsx @@ -50,7 +50,8 @@ export function TagsInput() { }} inputFieldPosition="inline" classNames={{ - tagInputField: 'outline-none text-light-violet', + tagInputField: + 'outline-none text-white placeholder:text-light-violet', tag: 'bg-violet px-2.5 py-0 h-[29px] flex gap-1.25 rounded-[10px] w-fit items-center', selected: 'flex gap-2.5 flex-wrap items-center', }} @@ -61,17 +62,22 @@ export function TagsInput() { ); } -class RemoveTag extends React.Component { +type RemoveTagProps = { + className?: string; + onRemove: () => void; +}; + +class RemoveTag extends React.Component { render(): React.ReactNode { - // @ts-expect-error ... const { className, onRemove } = this.props; + return (