Skip to content

Commit 572464b

Browse files
authored
feat(FormGroup): make titleText optional (#5196)
Fixes #5197
1 parent 4c393db commit 572464b

File tree

1 file changed

+6
-2
lines changed
  • packages/main/src/components/FormGroup

1 file changed

+6
-2
lines changed

packages/main/src/components/FormGroup/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface FormGroupPropTypes {
1010
/**
1111
* Title of the FormGroup.
1212
*/
13-
titleText: string;
13+
titleText?: string;
1414
/**
1515
* Content of the FormGroup.
1616
*
@@ -47,7 +47,11 @@ const FormGroup = (props: FormGroupPropTypes) => {
4747
<>
4848
<FormGroupTitle
4949
titleText={titleText}
50-
style={{ gridColumnStart: columnIndex * 12 + 1, gridRowStart: labelSpan === 12 ? rowIndex - 1 : rowIndex }}
50+
style={{
51+
display: titleText ? 'unset' : 'none',
52+
gridColumnStart: columnIndex * 12 + 1,
53+
gridRowStart: labelSpan === 12 ? rowIndex - 1 : rowIndex
54+
}}
5155
/>
5256
{children}
5357
</>

0 commit comments

Comments
 (0)