2024-06-25 02:07:57 +01:00
|
|
|
import Typography from '@mui/material/Typography';
|
|
|
|
|
import React, { ReactNode } from 'react';
|
2024-06-26 00:47:21 +01:00
|
|
|
import Grid from '@mui/material/Grid';
|
2024-06-25 02:07:57 +01:00
|
|
|
|
2024-06-26 07:47:17 +01:00
|
|
|
export interface ToolOptionGroup {
|
2024-06-25 07:15:42 +01:00
|
|
|
title: string;
|
|
|
|
|
component: ReactNode;
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-25 02:07:57 +01:00
|
|
|
export default function ToolOptionGroups({
|
2025-02-27 01:47:44 +00:00
|
|
|
groups,
|
|
|
|
|
vertical
|
2024-06-25 02:07:57 +01:00
|
|
|
}: {
|
2024-06-25 07:15:42 +01:00
|
|
|
groups: ToolOptionGroup[];
|
2025-02-27 01:47:44 +00:00
|
|
|
vertical?: boolean;
|
2024-06-25 02:07:57 +01:00
|
|
|
}) {
|
|
|
|
|
return (
|
2024-06-26 00:47:21 +01:00
|
|
|
<Grid container spacing={2}>
|
2024-06-25 02:07:57 +01:00
|
|
|
{groups.map((group) => (
|
2025-02-27 01:47:44 +00:00
|
|
|
<Grid item xs={12} md={vertical ? 12 : 4} key={group.title}>
|
2024-06-25 03:11:48 +01:00
|
|
|
<Typography mb={1} fontSize={22}>
|
|
|
|
|
{group.title}
|
|
|
|
|
</Typography>
|
2024-06-25 02:07:57 +01:00
|
|
|
{group.component}
|
2024-06-26 00:47:21 +01:00
|
|
|
</Grid>
|
2024-06-25 02:07:57 +01:00
|
|
|
))}
|
2024-06-26 00:47:21 +01:00
|
|
|
</Grid>
|
2024-06-25 02:07:57 +01:00
|
|
|
);
|
|
|
|
|
}
|