Skip to content

Commit 22372ff

Browse files
authored
fix(FormGroup): only place className on outer wrapper (#9526)
* fix(FormGroup): only place className on outer wrapper * chore(storybook): remove test story
1 parent c1e34b2 commit 22372ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/react/src/components/FormGroup/FormGroup.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import PropTypes from 'prop-types';
99
import React from 'react';
1010
import classnames from 'classnames';
1111
import { settings } from 'carbon-components';
12+
import { useFeatureFlag } from '../FeatureFlags';
1213

1314
const { prefix } = settings;
1415

@@ -23,7 +24,10 @@ const FormGroup = ({
2324
hasMargin,
2425
...other
2526
}) => {
26-
const classNamesLegend = classnames(`${prefix}--label`, className);
27+
const enabled = useFeatureFlag('enable-v11-release');
28+
const classNamesLegend = classnames(`${prefix}--label`, [
29+
enabled ? null : className,
30+
]);
2731
const classNamesFieldset = classnames(`${prefix}--fieldset`, className, {
2832
[`${prefix}--fieldset--no-margin`]: !hasMargin,
2933
});

0 commit comments

Comments
 (0)