Chats: use plus icon to upload attachment

This commit is contained in:
Alex Gleason 2023-01-20 11:29:40 -06:00
parent f222491b3e
commit af1ad92432
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 8 additions and 3 deletions

View File

@ -162,6 +162,7 @@ const ChatComposer = React.forwardRef<HTMLTextAreaElement | null, IChatComposer>
resetFileKey={resetFileKey}
iconClassName='w-5 h-5'
className='text-primary-500'
icon={require('@tabler/icons/plus.svg')}
/>
</Stack>
)}

View File

@ -22,6 +22,7 @@ export interface IUploadButton {
resetFileKey: number | null,
className?: string,
iconClassName?: string,
icon?: string,
}
const UploadButton: React.FC<IUploadButton> = ({
@ -31,6 +32,7 @@ const UploadButton: React.FC<IUploadButton> = ({
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<IUploadButton> = ({
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 (
<div>