Chats: use plus icon to upload attachment
This commit is contained in:
parent
f222491b3e
commit
af1ad92432
|
@ -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>
|
||||
)}
|
||||
|
|
|
@ -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)
|
||||
const src = icon || (
|
||||
onlyImages(attachmentTypes)
|
||||
? require('@tabler/icons/photo.svg')
|
||||
: require('@tabler/icons/paperclip.svg');
|
||||
: require('@tabler/icons/paperclip.svg')
|
||||
);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue