diff --git a/app/javascript/mastodon/components/form_fields/text_input.module.scss b/app/javascript/mastodon/components/form_fields/text_input.module.scss index 105b956cc5..cbb45e0a3a 100644 --- a/app/javascript/mastodon/components/form_fields/text_input.module.scss +++ b/app/javascript/mastodon/components/form_fields/text_input.module.scss @@ -1,7 +1,6 @@ .input { box-sizing: border-box; display: block; - resize: vertical; width: 100%; padding: 10px 16px; font-family: inherit; @@ -50,6 +49,10 @@ } } +textarea.input { + resize: vertical; +} + .iconWrapper { position: relative; } diff --git a/app/javascript/mastodon/components/modal_shell/index.tsx b/app/javascript/mastodon/components/modal_shell/index.tsx index 8b06087532..df8be5ef1f 100644 --- a/app/javascript/mastodon/components/modal_shell/index.tsx +++ b/app/javascript/mastodon/components/modal_shell/index.tsx @@ -1,16 +1,17 @@ import classNames from 'classnames'; +import { polymorphicForwardRef } from '@/types/polymorphic'; + interface ModalShellProps { className?: string; children?: React.ReactNode; } -export const ModalShell: React.FC = ({ - children, - className, -}) => { - return ( -
( + ({ as: Comp = 'form', children, className, ...restProps }, ref) => ( + = ({ )} > {children} -
- ); -}; + + ), +); +ModalShell.displayName = 'ModalShell'; export const ModalShellBody: React.FC = ({ children, diff --git a/app/javascript/mastodon/features/account_timeline/modals/join_modal.tsx b/app/javascript/mastodon/features/account_timeline/modals/join_modal.tsx index 0d21c82482..e5401fbebe 100644 --- a/app/javascript/mastodon/features/account_timeline/modals/join_modal.tsx +++ b/app/javascript/mastodon/features/account_timeline/modals/join_modal.tsx @@ -97,7 +97,7 @@ export const AccountJoinModal: FC<{ }, [anniversary, handle, dispatch, isMe]); return ( - + diff --git a/app/javascript/mastodon/features/ui/components/confirmation_modals/confirmation_modal.tsx b/app/javascript/mastodon/features/ui/components/confirmation_modals/confirmation_modal.tsx index b0397f4d7b..1dbc19ea3b 100644 --- a/app/javascript/mastodon/features/ui/components/confirmation_modals/confirmation_modal.tsx +++ b/app/javascript/mastodon/features/ui/components/confirmation_modals/confirmation_modal.tsx @@ -65,7 +65,7 @@ export const ConfirmationModal: React.FC< }, [onClose, onSecondary]); return ( - +

{title}

{message &&

{message}

} @@ -99,6 +99,7 @@ export const ConfirmationModal: React.FC< {/* eslint-disable jsx-a11y/no-autofocus -- we are in a modal and thus autofocusing is justified */}