mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-05-24 17:01:09 -04:00
Refactor maxHeight handling in messaging and editor components for consistency
This commit is contained in:
@@ -11,8 +11,8 @@ android {
|
||||
applicationId "com.compassconnections.app"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 108
|
||||
versionName "1.25.0"
|
||||
versionCode 109
|
||||
versionName "1.26.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -273,7 +273,7 @@ export const SendMessageButton = (props: {
|
||||
isSubmitting={!editor || submitting}
|
||||
isDisabled={charCount < MIN_CHARS}
|
||||
submitOnEnter={false}
|
||||
maxHeight={'25vh'} // otherwise send button gets hidden (need better fix)
|
||||
maxHeight={'max-h-[25vh]'} // otherwise send button gets hidden (need better fix)
|
||||
/>
|
||||
|
||||
<p className="text-ink-500 text-xs text-center leading-relaxed">
|
||||
|
||||
@@ -223,7 +223,16 @@ export function TextEditor(props: {
|
||||
onChange?: () => void
|
||||
maxHeight?: string
|
||||
}) {
|
||||
const {editor, simple, hideEmbed, children, className, onBlur, onChange, maxHeight} = props
|
||||
const {
|
||||
editor,
|
||||
simple,
|
||||
hideEmbed,
|
||||
children,
|
||||
className,
|
||||
onBlur,
|
||||
onChange,
|
||||
maxHeight = 'max-h-[69vh]',
|
||||
} = props
|
||||
|
||||
return (
|
||||
// matches input styling
|
||||
@@ -234,7 +243,7 @@ export function TextEditor(props: {
|
||||
)}
|
||||
>
|
||||
<FloatingFormatMenu editor={editor} advanced={!simple} />
|
||||
<div className={clsx(`overflow-auto`, maxHeight ? `max-h-[${maxHeight}]` : 'max-h-[69vh]')}>
|
||||
<div className={clsx(`overflow-auto`, maxHeight)}>
|
||||
<EditorContent editor={editor} onBlur={onBlur} onChange={onChange} />
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user