@sonardigital/carbon-ui 1.1.88 → 1.1.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonardigital/carbon-ui",
3
- "version": "1.1.88",
3
+ "version": "1.1.89",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "files": [
@@ -1,9 +1,10 @@
1
1
  import { Controller } from 'react-hook-form';
2
2
  import { FormBox, FormBoxProps } from './FormBox';
3
- import { Typography } from '@mui/material';
3
+ import { Grid, Typography } from '@mui/material';
4
4
 
5
5
  interface LocalFormBoxProps extends FormBoxProps {
6
6
  label: string;
7
+ size?: { xs: number; sm: number; md: number };
7
8
  }
8
9
 
9
10
  export function FormBoxes({
@@ -16,7 +17,7 @@ export function FormBoxes({
16
17
  sx?: Record<string, unknown>;
17
18
  }): React.ReactElement {
18
19
  return (
19
- <>
20
+ <Grid container width="100%" spacing={2}>
20
21
  {options.map(option => (
21
22
  <Controller
22
23
  name={name}
@@ -25,9 +26,11 @@ export function FormBoxes({
25
26
  option.value === undefined || option.value === null;
26
27
  const isSelected = option.value === field.value;
27
28
  return (
28
- <>
29
+ <Grid
30
+ size={{ xs: 6, sm: 4, md: 3, ...option.size }}
31
+ key={option.value}
32
+ >
29
33
  <FormBox
30
- key={option.value}
31
34
  name={name}
32
35
  value={option.value}
33
36
  color={option.color}
@@ -51,11 +54,11 @@ export function FormBoxes({
51
54
  >
52
55
  {option.label}
53
56
  </Typography>
54
- </>
57
+ </Grid>
55
58
  );
56
59
  }}
57
60
  />
58
61
  ))}
59
- </>
62
+ </Grid>
60
63
  );
61
64
  }