mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Make height smaller and allow width to change with node
This commit is contained in:
parent
f73b45bcb5
commit
7b428b5240
@ -9,9 +9,14 @@ import { ChangeEvent, memo } from 'react';
|
||||
import { FieldComponentProps } from './types';
|
||||
|
||||
const StringInputFieldComponent = (
|
||||
props: FieldComponentProps<StringInputFieldValue, StringInputFieldTemplate>
|
||||
props: FieldComponentProps<
|
||||
StringInputFieldValue,
|
||||
StringInputFieldTemplate
|
||||
> & {
|
||||
nodeWidth: number;
|
||||
}
|
||||
) => {
|
||||
const { nodeId, field } = props;
|
||||
const { nodeId, field, nodeWidth } = props;
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const handleValueChanged = (e: ChangeEvent<HTMLTextAreaElement>) => {
|
||||
@ -24,11 +29,13 @@ const StringInputFieldComponent = (
|
||||
);
|
||||
};
|
||||
|
||||
const textareaWidth = nodeWidth - 20;
|
||||
|
||||
return (
|
||||
<Textarea
|
||||
style={{
|
||||
height: '200px',
|
||||
width: '350px',
|
||||
height: '150px',
|
||||
width: `${textareaWidth}px`,
|
||||
resize: 'none',
|
||||
overflowY: 'auto',
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user