chore: add extra bottom padding to plain editor on iOS so text doesn't get hidden by floating butotn

This commit is contained in:
Aman Harwara
2024-02-26 20:21:41 +05:30
parent fa2543b188
commit f9be8b3d03
2 changed files with 5 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ const IosKeyboardClose = () => {
return (
<button
className={classNames(
'absolute bottom-3 right-3 rounded-full border border-border bg-contrast p-3',
'absolute bottom-1.5 right-3 rounded-full border border-border bg-contrast p-2.5',
isFocusInSuperEditor && 'hidden',
)}
>

View File

@@ -15,7 +15,7 @@ import {
WebAppEvent,
PrefDefaults,
} from '@standardnotes/snjs'
import { TAB_COMMAND } from '@standardnotes/ui-services'
import { isIOS, TAB_COMMAND } from '@standardnotes/ui-services'
import {
ChangeEventHandler,
forwardRef,
@@ -291,6 +291,9 @@ export const PlainEditor = forwardRef<PlainEditorInterface, Props>(
'editable font-editor flex-grow',
lineHeight && `leading-${lineHeight.toLowerCase()}`,
responsiveFontSize,
// Extra bottom padding is added on iOS so that text
// doesn't get hidden by the floating "Close keyboard" button
isIOS() && '!pb-12',
)}
></textarea>
)