cc and bcc

This commit is contained in:
hamid zarghami
2025-10-23 11:05:03 +03:30
parent a081c364fe
commit 58f054ccfa
3 changed files with 121 additions and 3 deletions
+14 -1
View File
@@ -8,6 +8,8 @@ interface EmailInputProps {
onRemoveEmail: (email: string) => void
suggestions: EmailSuggestion[]
onSearchSuggestions?: (query: string) => void
showCcBccButton?: boolean
onCcBccClick?: () => void
}
const EmailInput: FC<EmailInputProps> = ({
@@ -15,7 +17,9 @@ const EmailInput: FC<EmailInputProps> = ({
onAddEmail,
onRemoveEmail,
suggestions,
onSearchSuggestions
onSearchSuggestions,
showCcBccButton = false,
onCcBccClick
}) => {
const [to, setTo] = useState('')
const [filteredSuggestions, setFilteredSuggestions] = useState<EmailSuggestion[]>([])
@@ -195,6 +199,15 @@ const EmailInput: FC<EmailInputProps> = ({
placeholder={toEmails.length === 0 ? "ایمیل را وارد کرده و Enter بزنید" : ""}
className="flex-1 min-w-32 bg-transparent outline-none"
/>
{showCcBccButton && (
<button
onClick={onCcBccClick}
className='text-xs text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 transition-colors pt-[3px] cursor-pointer '
>
CC/BCC
</button>
)}
</div>
{showSuggestions && filteredSuggestions.length > 0 && (