omni-tools/src/components/ToolInputAndResult.tsx
Ibrahima G. Coulibaly 90e0389156 feat: edit image
2025-07-09 04:34:43 +01:00

25 lines
511 B
TypeScript

import React, { ReactNode } from 'react';
import Grid from '@mui/material/Grid';
export default function ToolInputAndResult({
input,
result
}: {
input?: ReactNode;
result?: ReactNode;
}) {
if (input || result) {
return (
<Grid id="tool" container spacing={2}>
{input && (
<Grid item xs={12} md={result ? 6 : 12}>
{input}
</Grid>
)}
<Grid item xs={12} md={input ? 6 : 12}>
{result}
</Grid>
</Grid>
);
}
}