Chats: improve upload button styles

This commit is contained in:
Alex Gleason 2022-12-06 16:33:53 -06:00
parent dc420a843b
commit 4c5e8eb525
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 12 additions and 2 deletions

View File

@ -152,7 +152,12 @@ const ChatComposer = React.forwardRef<HTMLTextAreaElement | null, IChatComposer>
<div className='mt-auto px-4 shadow-3xl'>
<HStack alignItems='stretch' justifyContent='between' space={4}>
<Stack justifyContent='end' alignItems='center' className='w-10 mb-1.5'>
<UploadButton onSelectFile={onSelectFile} resetFileKey={resetFileKey} />
<UploadButton
onSelectFile={onSelectFile}
resetFileKey={resetFileKey}
iconClassName='w-5 h-5'
className='text-primary-500'
/>
</Stack>
<Stack grow>

View File

@ -20,6 +20,8 @@ export interface IUploadButton {
onSelectFile: (files: FileList, intl: IntlShape) => void,
style?: React.CSSProperties,
resetFileKey: number | null,
className?: string,
iconClassName?: string,
}
const UploadButton: React.FC<IUploadButton> = ({
@ -27,6 +29,8 @@ const UploadButton: React.FC<IUploadButton> = ({
unavailable = false,
onSelectFile,
resetFileKey,
className = 'text-gray-600 hover:text-gray-700 dark:hover:text-gray-500',
iconClassName,
}) => {
const intl = useIntl();
const { configuration } = useInstance();
@ -56,7 +60,8 @@ const UploadButton: React.FC<IUploadButton> = ({
<div>
<IconButton
src={src}
className='text-gray-600 hover:text-gray-700 dark:hover:text-gray-500'
className={className}
iconClassName={iconClassName}
title={intl.formatMessage(messages.upload)}
disabled={disabled}
onClick={handleClick}