Lint Code

This commit is contained in:
mickr777 2023-07-26 18:35:04 +10:00 committed by GitHub
parent de73e4f5b9
commit 2d0f932737
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
import { memo, ChangeEvent } from 'react';
import { Textarea, Input } from '@chakra-ui/react';
import { useAppDispatch } from 'app/store/storeHooks';
import { fieldValueChanged } from 'features/nodes/store/nodesSlice';
@ -5,9 +6,10 @@ import {
StringInputFieldTemplate,
StringInputFieldValue,
} from 'features/nodes/types/types';
import { ChangeEvent, memo } from 'react';
import { FieldComponentProps } from './types';
const FIELD_PADDING = 20;
const StringInputFieldComponent = (
props: FieldComponentProps<
StringInputFieldValue,
@ -31,12 +33,13 @@ const StringInputFieldComponent = (
);
};
const textareaWidth = nodeWidth - 20;
const textareaWidth = nodeWidth - FIELD_PADDING;
const textareaFieldNames = ['prompt', 'text'];
return (
<>
{field.name.toLowerCase() === 'prompt' ||
field.name.toLowerCase() === 'text' ? (
{textareaFieldNames.includes(field.name.toLowerCase()) ? (
<Textarea
style={{
height: '150px',