refactor: tool input and result

This commit is contained in:
Ibrahima G. Coulibaly
2024-06-25 07:15:42 +01:00
parent 3d8110b05e
commit c49d18cac3
8 changed files with 150 additions and 119 deletions

View File

@@ -0,0 +1,21 @@
import React, { ReactNode } from 'react';
import Grid from '@mui/material/Grid';
export default function ToolInputAndResult({
input,
result
}: {
input: ReactNode;
result: ReactNode;
}) {
return (
<Grid container spacing={2}>
<Grid item xs={6}>
{input}
</Grid>
<Grid item xs={6}>
{result}
</Grid>
</Grid>
);
}

View File

@@ -2,10 +2,15 @@ import Typography from '@mui/material/Typography';
import React, { ReactNode } from 'react';
import { Box, Stack } from '@mui/material';
interface ToolOptionGroup {
title: string;
component: ReactNode;
}
export default function ToolOptionGroups({
groups
}: {
groups: { title: string; component: ReactNode }[];
groups: ToolOptionGroup[];
}) {
return (
<Stack direction={'row'} spacing={2}>