@@ -5,7 +5,6 @@ import { hideActiveTooltip } from '@components/ui/tooltip';
55import { TooltipWrapper } from '@components/ui/tooltip-wrapper' ;
66import { useFileTypes } from '@lib/hooks/use-file-types' ;
77import { useMobile } from '@lib/hooks/use-mobile' ;
8- import { useTheme } from '@lib/hooks/use-theme' ;
98import { useAttachmentStore } from '@lib/stores/attachment-store' ;
109import { cn } from '@lib/utils' ;
1110import { Loader2 , Paperclip } from 'lucide-react' ;
@@ -36,7 +35,6 @@ export const FileTypeSelector = ({
3635 className,
3736} : FileTypeSelectorProps ) => {
3837 const { fileTypes, uploadConfig, isLoading, error } = useFileTypes ( ) ;
39- const { isDark } = useTheme ( ) ;
4038 const isMobile = useMobile ( ) ;
4139 const [ isOpen , setIsOpen ] = useState ( false ) ;
4240 const attachmentFiles = useAttachmentStore ( state => state . files ) ;
@@ -128,7 +126,6 @@ export const FileTypeSelector = ({
128126 < Paperclip className = "h-4 w-4" />
129127 )
130128 }
131- isDark = { isDark }
132129 ariaLabel = { ariaLabel || t ( 'fileTypeSelector.ariaLabel' ) }
133130 disabled = { isDisabled }
134131 className = { cn (
@@ -168,7 +165,7 @@ export const FileTypeSelector = ({
168165 < div
169166 className = { cn (
170167 'flex items-center justify-center py-4 font-serif' ,
171- isDark ? 'text-gray-400' : ' text-gray-500 '
168+ 'text-gray-500 dark: text-gray-400 '
172169 ) }
173170 >
174171 < Loader2 className = "mr-2 h-4 w-4 animate-spin" />
@@ -178,7 +175,7 @@ export const FileTypeSelector = ({
178175 < div
179176 className = { cn (
180177 'px-3 py-2 font-serif text-sm' ,
181- isDark ? 'text-red-300' : ' text-red-500 '
178+ 'text-red-500 dark: text-red-300 '
182179 ) }
183180 >
184181 { t ( 'fileTypeSelector.loadError' ) }
@@ -187,7 +184,7 @@ export const FileTypeSelector = ({
187184 < div
188185 className = { cn (
189186 'px-3 py-2 text-center font-serif text-sm' ,
190- isDark ? 'text-gray-400' : ' text-gray-500 '
187+ 'text-gray-500 dark: text-gray-400 '
191188 ) }
192189 >
193190 { t ( 'fileTypeSelector.noTypesConfigured' ) }
@@ -198,9 +195,7 @@ export const FileTypeSelector = ({
198195 < div
199196 className = { cn (
200197 'mb-1 border-b px-3 py-1 font-serif text-xs' ,
201- isDark
202- ? 'border-gray-600 text-gray-400'
203- : 'border-gray-200 text-gray-500'
198+ 'border-gray-200 text-gray-500 dark:border-gray-600 dark:text-gray-400'
204199 ) }
205200 >
206201 { uploadConfig . maxFiles > 0 ? (
@@ -216,7 +211,7 @@ export const FileTypeSelector = ({
216211 < div
217212 className = { cn (
218213 'mt-1 text-xs' ,
219- isDark ? 'text-orange-400' : ' text-orange-600 '
214+ 'text-orange-600 dark: text-orange-400 '
220215 ) }
221216 >
222217 { t ( 'fileTypeSelector.reachedLimit' , {
@@ -242,7 +237,7 @@ export const FileTypeSelector = ({
242237 < span
243238 className = { cn (
244239 'font-serif text-xs' ,
245- isDark ? 'text-gray-400' : ' text-gray-500 '
240+ 'text-gray-500 dark: text-gray-400 '
246241 ) }
247242 >
248243 { type . maxSize }
0 commit comments