File tree Expand file tree Collapse file tree
packages/react/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88import classNames from 'classnames' ;
99import PropTypes from 'prop-types' ;
10+ import * as FeatureFlags from '@carbon/feature-flags' ;
1011import React from 'react' ;
1112import Filename from './Filename' ;
1213import FileUploaderButton from './FileUploaderButton' ;
@@ -46,7 +47,9 @@ export default class FileUploader extends React.Component {
4647 /**
4748 * Provide a description for the complete/close icon that can be read by screen readers
4849 */
49- iconDescription : PropTypes . string ,
50+ iconDescription : FeatureFlags . enabled ( 'enable-v11-release' )
51+ ? PropTypes . string . isRequired
52+ : PropTypes . string ,
5053
5154 /**
5255 * Specify the description text of this <FileUploader>
@@ -97,7 +100,9 @@ export default class FileUploader extends React.Component {
97100 static contextType = PrefixContext ;
98101
99102 static defaultProps = {
100- iconDescription : 'Provide icon description' ,
103+ iconDescription : FeatureFlags . enabled ( 'enable-v11-release' )
104+ ? undefined
105+ : 'Provide icon description' ,
101106 filenameStatus : 'uploading' ,
102107 buttonLabel : '' ,
103108 buttonKind : 'primary' ,
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ Loading.propTypes = {
8484 className : PropTypes . string ,
8585
8686 /**
87- * Specify an description that would be used to best describe the loading state
87+ * Specify a description that would be used to best describe the loading state
8888 */
8989 description : PropTypes . string ,
9090
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import React, { Component } from 'react';
1010import classNames from 'classnames' ;
1111import { settings } from 'carbon-components' ;
1212import { Add16 , Subtract16 } from '@carbon/icons-react' ;
13+ import * as FeatureFlags from '@carbon/feature-flags' ;
1314import mergeRefs from '../../tools/mergeRefs' ;
1415import requiredIfValueExists from '../../prop-types/requiredIfValueExists' ;
1516// replace "use" prefix to avoid react thinking this is a hook that
@@ -190,10 +191,14 @@ class NumberInput extends Component {
190191 static defaultProps = {
191192 disabled : false ,
192193 hideLabel : false ,
193- iconDescription : 'choose a number' ,
194+ iconDescription : FeatureFlags . enabled ( 'enable-v11-release' )
195+ ? undefined
196+ : 'choose a number' ,
194197 step : 1 ,
195198 invalid : false ,
196- invalidText : 'Provide invalidText' ,
199+ invalidText : FeatureFlags . enabled ( 'enable-v11-release' )
200+ ? undefined
201+ : 'Provide invalidText' ,
197202 warn : false ,
198203 warnText : '' ,
199204 ariaLabel : 'Numeric input field with increment and decrement buttons' ,
Original file line number Diff line number Diff line change 88import PropTypes from 'prop-types' ;
99import React from 'react' ;
1010import classnames from 'classnames' ;
11+ import * as FeatureFlags from '@carbon/feature-flags' ;
1112import { settings } from 'carbon-components' ;
1213
1314const { prefix } = settings ;
@@ -55,7 +56,9 @@ SelectItemGroup.propTypes = {
5556
5657SelectItemGroup . defaultProps = {
5758 disabled : false ,
58- label : 'Provide label' ,
59+ label : FeatureFlags . enabled ( 'enable-v11-release' )
60+ ? undefined
61+ : 'Provide label' ,
5962} ;
6063
6164export default SelectItemGroup ;
Original file line number Diff line number Diff line change 88import PropTypes from 'prop-types' ;
99import React from 'react' ;
1010import classNames from 'classnames' ;
11+ import * as FeatureFlags from '@carbon/feature-flags' ;
1112import { settings } from 'carbon-components' ;
1213import deprecate from '../../prop-types/deprecate' ;
1314
@@ -54,7 +55,9 @@ export default class Tab extends React.Component {
5455 /**
5556 * Provide the contents of your Tab
5657 */
57- label : PropTypes . node ,
58+ label : FeatureFlags . enabled ( 'enable-v11-release' )
59+ ? PropTypes . node . isRequired
60+ : PropTypes . node ,
5861
5962 /**
6063 * Provide a handler that is invoked when a user clicks on the control
@@ -97,7 +100,9 @@ export default class Tab extends React.Component {
97100 } ;
98101
99102 static defaultProps = {
100- label : 'provide a label' ,
103+ label : FeatureFlags . enabled ( 'enable-v11-release' )
104+ ? undefined
105+ : 'provide a label' ,
101106 selected : false ,
102107 onClick : ( ) => { } ,
103108 onKeyDown : ( ) => { } ,
You can’t perform that action at this time.
0 commit comments