fix: make sure to show scroll bar on fixed height session input

pull/3148/head
yougotwill 8 months ago
parent 77cafde13a
commit 7708bc97c1

@ -13,12 +13,15 @@ import { CopyToClipboardButton } from '../buttons/CopyToClipboardButton';
import { SessionInput } from '../inputs'; import { SessionInput } from '../inputs';
import { SessionWrapperModal } from '../SessionWrapperModal'; import { SessionWrapperModal } from '../SessionWrapperModal';
import { ConversationTypeEnum } from '../../models/types'; import { ConversationTypeEnum } from '../../models/types';
import { StyledTextAreaContainer } from '../inputs/SessionInput';
const StyledInputContainer = styled(Flex)` const StyledInputContainer = styled(Flex)`
textarea { ${StyledTextAreaContainer} {
cursor: default; overflow-y: hidden;
overflow: hidden; textarea {
top: 14px; cursor: default;
top: 10px;
}
} }
`; `;

@ -99,9 +99,12 @@ export const StyledTextAreaContainer = styled(motion.div)<{
}>` }>`
display: flex; display: flex;
align-items: center; align-items: center;
overflow: hidden; overflow-y: ${props => (props.noValue ? 'hidden' : 'auto')};
position: relative; position: relative;
height: ${props => (props.textSize ? `calc(var(--font-size-${props.textSize}) * 4)` : '48px')}; min-height: 48px;
height: 100%;
max-height: ${props =>
props.textSize ? `calc(var(--font-size-${props.textSize}) * 4)` : '48px'};
width: 100%; width: 100%;
margin: var(--margins-sm) var(--margins-md); margin: var(--margins-sm) var(--margins-md);

@ -56,10 +56,11 @@ const StyledButtonerContainer = styled.div`
const StyledInputContainer = styled(Flex)` const StyledInputContainer = styled(Flex)`
${StyledTextAreaContainer} { ${StyledTextAreaContainer} {
margin: var(--margins-sm); margin: var(--margins-sm);
overflow-y: hidden;
textarea { textarea {
cursor: default; cursor: default;
overflow: hidden; top: 10px;
top: 12px;
} }
} }
`; `;

Loading…
Cancel
Save