diff --git a/src/modules/form/components/DynamicGroup.tsx b/src/modules/form/components/DynamicGroup.tsx
index 07c870989..c5dfeb89d 100644
--- a/src/modules/form/components/DynamicGroup.tsx
+++ b/src/modules/form/components/DynamicGroup.tsx
@@ -1,5 +1,4 @@
-import { Box, Grid, lighten } from '@mui/material';
-import { ReactNode } from 'react';
+import { Grid, lighten } from '@mui/material';
import { GroupItemComponentProps } from '../types';
@@ -14,27 +13,6 @@ import TableGroup from './group/TableGroup';
import Signature from '@/modules/form/components/group/Signature';
import { Component } from '@/types/gqlTypes';
-export const InfoGroup = ({
- children,
-}: {
- children: ReactNode;
- nestingLevel?: number;
-}) => (
- lighten(theme.palette.grey[100], 0.2),
- borderRadius: 1,
- width: 'fit-content',
- px: 0.5,
- // use box shadow to "extend" background color beyond div. doing this so we dont mess with the height
- boxShadow: (theme) =>
- `0 2px 0 6px ${lighten(theme.palette.grey[100], 0.2)}`,
- }}
- >
- {children}
-
-);
-
interface Props extends GroupItemComponentProps {
clientId?: string;
debug?: (ids?: string[]) => void;
@@ -75,9 +53,18 @@ const DynamicGroup: React.FC = ({ debug, ...props }) => {
return ;
case Component.InfoGroup:
return (
-
-
-
+ lighten(theme.palette.grey[100], 0.2),
+ borderRadius: 1,
+ px: 0.5,
+ // use box shadow to "extend" background color beyond div. doing this so we dont mess with the height
+ boxShadow: (theme) =>
+ `0 2px 0 6px ${lighten(theme.palette.grey[100], 0.2)}`,
+ }}
+ />
);
case Component.Table:
return ;
diff --git a/src/modules/form/components/group/QuestionGroup.tsx b/src/modules/form/components/group/QuestionGroup.tsx
index 5d3327449..249728a14 100644
--- a/src/modules/form/components/group/QuestionGroup.tsx
+++ b/src/modules/form/components/group/QuestionGroup.tsx
@@ -1,4 +1,4 @@
-import { Box, Grid, Typography } from '@mui/material';
+import { Box, Grid, SxProps, Theme, Typography } from '@mui/material';
import { GroupItemComponentProps } from '../../types';
@@ -9,7 +9,8 @@ const QuestionGroup = ({
nestingLevel,
renderChildItem,
viewOnly = false,
-}: GroupItemComponentProps) => {
+ sx,
+}: GroupItemComponentProps & { sx?: SxProps }) => {
const wrappedChildren = (
{renderChildItem &&
@@ -27,7 +28,7 @@ const QuestionGroup = ({
if (nestingLevel >= 1) {
return (
-
+
+
{label && {label}}
{wrappedChildren}