sforkowany z mirror/soapbox
Chats: improve upload button styles
rodzic
dc420a843b
commit
4c5e8eb525
|
@ -152,7 +152,12 @@ const ChatComposer = React.forwardRef<HTMLTextAreaElement | null, IChatComposer>
|
||||||
<div className='mt-auto px-4 shadow-3xl'>
|
<div className='mt-auto px-4 shadow-3xl'>
|
||||||
<HStack alignItems='stretch' justifyContent='between' space={4}>
|
<HStack alignItems='stretch' justifyContent='between' space={4}>
|
||||||
<Stack justifyContent='end' alignItems='center' className='w-10 mb-1.5'>
|
<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>
|
||||||
|
|
||||||
<Stack grow>
|
<Stack grow>
|
||||||
|
|
|
@ -20,6 +20,8 @@ export interface IUploadButton {
|
||||||
onSelectFile: (files: FileList, intl: IntlShape) => void,
|
onSelectFile: (files: FileList, intl: IntlShape) => void,
|
||||||
style?: React.CSSProperties,
|
style?: React.CSSProperties,
|
||||||
resetFileKey: number | null,
|
resetFileKey: number | null,
|
||||||
|
className?: string,
|
||||||
|
iconClassName?: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
const UploadButton: React.FC<IUploadButton> = ({
|
const UploadButton: React.FC<IUploadButton> = ({
|
||||||
|
@ -27,6 +29,8 @@ const UploadButton: React.FC<IUploadButton> = ({
|
||||||
unavailable = false,
|
unavailable = false,
|
||||||
onSelectFile,
|
onSelectFile,
|
||||||
resetFileKey,
|
resetFileKey,
|
||||||
|
className = 'text-gray-600 hover:text-gray-700 dark:hover:text-gray-500',
|
||||||
|
iconClassName,
|
||||||
}) => {
|
}) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const { configuration } = useInstance();
|
const { configuration } = useInstance();
|
||||||
|
@ -56,7 +60,8 @@ const UploadButton: React.FC<IUploadButton> = ({
|
||||||
<div>
|
<div>
|
||||||
<IconButton
|
<IconButton
|
||||||
src={src}
|
src={src}
|
||||||
className='text-gray-600 hover:text-gray-700 dark:hover:text-gray-500'
|
className={className}
|
||||||
|
iconClassName={iconClassName}
|
||||||
title={intl.formatMessage(messages.upload)}
|
title={intl.formatMessage(messages.upload)}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
|
|
Ładowanie…
Reference in New Issue