From af1ad92432a0e285224b06cb90cfa47989e68703 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 20 Jan 2023 11:29:40 -0600 Subject: [PATCH] Chats: use plus icon to upload attachment --- .../features/chats/components/chat-composer.tsx | 1 + .../features/compose/components/upload-button.tsx | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/soapbox/features/chats/components/chat-composer.tsx b/app/soapbox/features/chats/components/chat-composer.tsx index 358fbb6f3..be1d7b907 100644 --- a/app/soapbox/features/chats/components/chat-composer.tsx +++ b/app/soapbox/features/chats/components/chat-composer.tsx @@ -162,6 +162,7 @@ const ChatComposer = React.forwardRef resetFileKey={resetFileKey} iconClassName='w-5 h-5' className='text-primary-500' + icon={require('@tabler/icons/plus.svg')} /> )} diff --git a/app/soapbox/features/compose/components/upload-button.tsx b/app/soapbox/features/compose/components/upload-button.tsx index 7d6f31c65..e5c12e8b5 100644 --- a/app/soapbox/features/compose/components/upload-button.tsx +++ b/app/soapbox/features/compose/components/upload-button.tsx @@ -22,6 +22,7 @@ export interface IUploadButton { resetFileKey: number | null, className?: string, iconClassName?: string, + icon?: string, } const UploadButton: React.FC = ({ @@ -31,6 +32,7 @@ const UploadButton: React.FC = ({ resetFileKey, className = 'text-gray-600 hover:text-gray-700 dark:hover:text-gray-500', iconClassName, + icon, }) => { const intl = useIntl(); const { configuration } = useInstance(); @@ -52,9 +54,11 @@ const UploadButton: React.FC = ({ return null; } - const src = onlyImages(attachmentTypes) - ? require('@tabler/icons/photo.svg') - : require('@tabler/icons/paperclip.svg'); + const src = icon || ( + onlyImages(attachmentTypes) + ? require('@tabler/icons/photo.svg') + : require('@tabler/icons/paperclip.svg') + ); return (