2024-06-25 07:15:42 +01:00
|
|
|
import React, { ReactNode } from 'react';
|
|
|
|
|
import Grid from '@mui/material/Grid';
|
|
|
|
|
|
|
|
|
|
export default function ToolInputAndResult({
|
|
|
|
|
input,
|
|
|
|
|
result
|
|
|
|
|
}: {
|
2024-06-27 18:39:55 +01:00
|
|
|
input?: ReactNode;
|
2025-04-05 04:36:22 +00:00
|
|
|
result?: ReactNode;
|
2024-06-25 07:15:42 +01:00
|
|
|
}) {
|
2025-04-05 04:36:22 +00:00
|
|
|
if (input || result) {
|
|
|
|
|
return (
|
|
|
|
|
<Grid id="tool" container spacing={2}>
|
|
|
|
|
{input && (
|
|
|
|
|
<Grid item xs={12} md={6}>
|
|
|
|
|
{input}
|
|
|
|
|
</Grid>
|
|
|
|
|
)}
|
|
|
|
|
<Grid item xs={12} md={input ? 6 : 12}>
|
|
|
|
|
{result}
|
2024-06-27 18:39:55 +01:00
|
|
|
</Grid>
|
2024-06-25 07:15:42 +01:00
|
|
|
</Grid>
|
2025-04-05 04:36:22 +00:00
|
|
|
);
|
|
|
|
|
}
|
2024-06-25 07:15:42 +01:00
|
|
|
}
|