999dcd4468
## Before <img width="1031" height="836" alt="image" src="https://github.com/user-attachments/assets/475ca1be-f7c4-49d0-b329-649dbe8da489" /> ## After <img width="1195" height="862" alt="image" src="https://github.com/user-attachments/assets/b1bac131-e562-4439-8f8e-bda4d6e2a646" /> --------- Co-authored-by: Charles Bochet <charles@twenty.com>
42 lines
883 B
TypeScript
42 lines
883 B
TypeScript
import { useLingui } from '@lingui/react/macro';
|
|
import { ResizeHandle, useResizeHandle } from 'twenty-ui/layout';
|
|
import { TextArea } from '@/ui/input/components/TextArea';
|
|
|
|
type LogicFunctionLogsProps = {
|
|
componentInstanceId: string;
|
|
value: string;
|
|
};
|
|
|
|
export const LogicFunctionLogs = ({
|
|
componentInstanceId,
|
|
value,
|
|
}: LogicFunctionLogsProps) => {
|
|
const { t } = useLingui();
|
|
|
|
const {
|
|
size: height,
|
|
handleResizeStart,
|
|
handleResizeMove,
|
|
handleResizeEnd,
|
|
} = useResizeHandle({
|
|
initialSize: 150,
|
|
});
|
|
|
|
return (
|
|
<>
|
|
<TextArea
|
|
textAreaId={`logs-${componentInstanceId}`}
|
|
label={t`Logs`}
|
|
value={value}
|
|
height={height}
|
|
readOnly
|
|
/>
|
|
<ResizeHandle
|
|
onPointerDown={handleResizeStart}
|
|
onPointerMove={handleResizeMove}
|
|
onPointerUp={handleResizeEnd}
|
|
/>
|
|
</>
|
|
);
|
|
};
|