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';
|
import { FieldComponentProps } from './types';
|
||||||
|
|
||||||
const StringInputFieldComponent = (
|
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 dispatch = useAppDispatch();
|
||||||
|
|
||||||
const handleValueChanged = (e: ChangeEvent<HTMLTextAreaElement>) => {
|
const handleValueChanged = (e: ChangeEvent<HTMLTextAreaElement>) => {
|
||||||
@ -24,11 +29,13 @@ const StringInputFieldComponent = (
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const textareaWidth = nodeWidth - 20;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Textarea
|
<Textarea
|
||||||
style={{
|
style={{
|
||||||
height: '200px',
|
height: '150px',
|
||||||
width: '350px',
|
width: `${textareaWidth}px`,
|
||||||
resize: 'none',
|
resize: 'none',
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
}}
|
}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user