Skip to content

Commit

Permalink
feat(carbon-react): remove label from default props (#9731)
Browse files Browse the repository at this point in the history
* feat(Carbon-React): remove label from default props

* feat(Carbon-React): revert Switch.js changes, update overflow menu item

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
dakahn and kodiakhq[bot] committed Nov 8, 2021
1 parent e7b27cf commit c06edfa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 7 additions & 2 deletions packages/react/src/components/OverflowMenu/OverflowMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { OverflowMenuVertical16 } from '@carbon/icons-react';
import { keys, matches as keyCodeMatches } from '../../internal/keyboard';
import mergeRefs from '../../tools/mergeRefs';
import { PrefixContext } from '../../internal/usePrefix';
import * as FeatureFlags from '@carbon/feature-flags';

const on = (element, ...args) => {
element.addEventListener(...args);
Expand Down Expand Up @@ -97,7 +98,9 @@ class OverflowMenu extends Component {
/**
* The ARIA label.
*/
ariaLabel: PropTypes.string,
ariaLabel: FeatureFlags.enabled('enable-v11-release')
? PropTypes.string.isRequired
: PropTypes.string,

/**
* The child nodes.
Expand Down Expand Up @@ -218,7 +221,9 @@ class OverflowMenu extends Component {
static contextType = PrefixContext;

static defaultProps = {
ariaLabel: 'open and close list of options',
ariaLabel: FeatureFlags.enabled('enable-v11-release')
? null
: 'open and close list of options',
iconDescription: 'open and close list of options',
open: false,
direction: DIRECTION_BOTTOM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import React from 'react';
import { match, keys } from '../../internal/keyboard';
import { warning } from '../../internal/warning';
import deprecate from '../../prop-types/deprecate.js';
import * as FeatureFlags from '@carbon/feature-flags';

const { prefix } = settings;

Expand Down Expand Up @@ -100,7 +101,9 @@ export default class OverflowMenuItem extends React.Component {
hasDivider: false,
isDelete: false,
disabled: false,
itemText: 'Provide itemText',
itemText: FeatureFlags.enabled('enable-v11-release')
? null
: 'Provide itemText',
onClick: () => {},
onKeyDown: () => {},
};
Expand Down

0 comments on commit c06edfa

Please sign in to comment.