@@ -7,7 +7,8 @@ import { Send, Square } from 'lucide-react'
77import { Tooltip , TooltipContent , TooltipProvider , TooltipTrigger } from '@/components/ui/tooltip'
88import { VoiceInput } from './voice-input'
99
10- const PLACEHOLDER = 'Enter a message or click the mic to speak'
10+ const PLACEHOLDER_MOBILE = 'Enter a message'
11+ const PLACEHOLDER_DESKTOP = 'Enter a message or click the mic to speak'
1112const MAX_TEXTAREA_HEIGHT = 160 // Max height in pixels (e.g., for about 4-5 lines)
1213
1314const containerVariants = {
@@ -195,31 +196,50 @@ export const ChatInput: React.FC<{
195196
196197 < div className = 'pointer-events-none absolute top-0 left-0 flex h-full w-full items-center' >
197198 { ! isActive && ! inputValue && (
198- < div
199- className = '-translate-y-1/2 absolute top-1/2 left-3 select-none text-gray-400'
200- style = { {
201- whiteSpace : 'nowrap' ,
202- zIndex : 0 ,
203- background :
204- 'linear-gradient(90deg, rgba(150,150,150,0.2) 0%, rgba(150,150,150,0.8) 50%, rgba(150,150,150,0.2) 100%)' ,
205- backgroundSize : '200% 100%' ,
206- WebkitBackgroundClip : 'text' ,
207- WebkitTextFillColor : 'transparent' ,
208- animation : 'shimmer 10s infinite linear' ,
209- } }
210- >
211- { PLACEHOLDER }
212- < style jsx global > { `
213- @keyframes shimmer {
214- 0% {
215- background-position: 200% 0;
199+ < >
200+ { /* Mobile placeholder */ }
201+ < div
202+ className = '-translate-y-1/2 absolute top-1/2 left-3 select-none text-gray-400 md:hidden'
203+ style = { {
204+ whiteSpace : 'nowrap' ,
205+ zIndex : 0 ,
206+ background :
207+ 'linear-gradient(90deg, rgba(150,150,150,0.2) 0%, rgba(150,150,150,0.8) 50%, rgba(150,150,150,0.2) 100%)' ,
208+ backgroundSize : '200% 100%' ,
209+ WebkitBackgroundClip : 'text' ,
210+ WebkitTextFillColor : 'transparent' ,
211+ animation : 'shimmer 10s infinite linear' ,
212+ } }
213+ >
214+ { PLACEHOLDER_MOBILE }
215+ </ div >
216+ { /* Desktop placeholder */ }
217+ < div
218+ className = '-translate-y-1/2 absolute top-1/2 left-3 hidden select-none text-gray-400 md:block'
219+ style = { {
220+ whiteSpace : 'nowrap' ,
221+ zIndex : 0 ,
222+ background :
223+ 'linear-gradient(90deg, rgba(150,150,150,0.2) 0%, rgba(150,150,150,0.8) 50%, rgba(150,150,150,0.2) 100%)' ,
224+ backgroundSize : '200% 100%' ,
225+ WebkitBackgroundClip : 'text' ,
226+ WebkitTextFillColor : 'transparent' ,
227+ animation : 'shimmer 10s infinite linear' ,
228+ } }
229+ >
230+ { PLACEHOLDER_DESKTOP }
231+ < style jsx global > { `
232+ @keyframes shimmer {
233+ 0% {
234+ background-position: 200% 0;
235+ }
236+ 100% {
237+ background-position: -200% 0;
238+ }
216239 }
217- 100% {
218- background-position: -200% 0;
219- }
220- }
221- ` } </ style >
222- </ div >
240+ ` } </ style >
241+ </ div >
242+ </ >
223243 ) }
224244 </ div >
225245 </ div >
0 commit comments