diff --git a/app/soapbox/components/dropdown-menu.tsx b/app/soapbox/components/dropdown-menu.tsx index 77be0f18d..807e94997 100644 --- a/app/soapbox/components/dropdown-menu.tsx +++ b/app/soapbox/components/dropdown-menu.tsx @@ -259,6 +259,7 @@ export interface IDropdown extends RouteComponentProps { text?: string, onShiftClick?: React.EventHandler, children?: JSX.Element, + dropdownMenuStyle?: React.CSSProperties, } interface IDropdownState { @@ -369,7 +370,7 @@ class Dropdown extends React.PureComponent { } render() { - const { src = require('@tabler/icons/dots.svg'), items, title, disabled, dropdownPlacement, openDropdownId, openedViaKeyboard = false, pressed, text, children } = this.props; + const { src = require('@tabler/icons/dots.svg'), items, title, disabled, dropdownPlacement, openDropdownId, openedViaKeyboard = false, pressed, text, children, dropdownMenuStyle } = this.props; const open = this.state.id === openDropdownId; return ( @@ -403,7 +404,7 @@ class Dropdown extends React.PureComponent { )} - + ); diff --git a/app/soapbox/components/ui/textarea/textarea.tsx b/app/soapbox/components/ui/textarea/textarea.tsx index c1bbe0ee4..e9788a069 100644 --- a/app/soapbox/components/ui/textarea/textarea.tsx +++ b/app/soapbox/components/ui/textarea/textarea.tsx @@ -1,7 +1,7 @@ import classNames from 'clsx'; import React from 'react'; -interface ITextarea extends Pick, 'maxLength' | 'onChange' | 'required' | 'disabled' | 'rows' | 'readOnly'> { +interface ITextarea extends Pick, 'maxLength' | 'onChange' | 'required' | 'disabled' | 'rows' | 'readOnly' | 'onKeyDown' | 'onPaste'> { /** Put the cursor into the input on mount. */ autoFocus?: boolean, /** The initial text in the input. */ diff --git a/app/soapbox/features/chats/components/chat-box.tsx b/app/soapbox/features/chats/components/chat-box.tsx index de97cd45a..38ef43c74 100644 --- a/app/soapbox/features/chats/components/chat-box.tsx +++ b/app/soapbox/features/chats/components/chat-box.tsx @@ -8,6 +8,7 @@ import { } from 'soapbox/actions/chats'; import { uploadMedia } from 'soapbox/actions/media'; import IconButton from 'soapbox/components/icon-button'; +import { Textarea } from 'soapbox/components/ui'; import UploadProgress from 'soapbox/components/upload-progress'; import UploadButton from 'soapbox/features/compose/components/upload-button'; import { useAppSelector, useAppDispatch } from 'soapbox/hooks'; @@ -179,11 +180,11 @@ const ChatBox: React.FC = ({ chatId, onSetInputRef, autosize }) => { {isUploading && ( )} -
+
{renderActionButton()}
-