diff --git a/packages/react-core/src/components/Toolbar/ToolbarContent.tsx b/packages/react-core/src/components/Toolbar/ToolbarContent.tsx index f26fb2e9114..e5301f1ec5a 100644 --- a/packages/react-core/src/components/Toolbar/ToolbarContent.tsx +++ b/packages/react-core/src/components/Toolbar/ToolbarContent.tsx @@ -9,14 +9,6 @@ export interface ToolbarContentProps extends React.HTMLProps { /** Classes applied to root element of the data toolbar content row */ className?: string; /** Visibility at various breakpoints. */ - visibility?: { - default?: 'hidden' | 'visible'; - md?: 'hidden' | 'visible'; - lg?: 'hidden' | 'visible'; - xl?: 'hidden' | 'visible'; - '2xl'?: 'hidden' | 'visible'; - }; - /** Deprecated: prop misspelled */ visiblity?: { default?: 'hidden' | 'visible'; md?: 'hidden' | 'visible'; @@ -63,7 +55,6 @@ export class ToolbarContent extends React.Component { children, isExpanded, toolbarId, - visibility, visiblity, alignment, clearAllFilters, @@ -72,19 +63,11 @@ export class ToolbarContent extends React.Component { ...props } = this.props; - if (visiblity !== undefined) { - // eslint-disable-next-line no-console - console.warn( - 'The ToolbarContent visiblity prop has been deprecated. ' + - 'Please use the correctly spelled visibility prop instead.' - ); - } - return (
, /** A type modifier which modifies spacing specifically depending on the type of group */ variant?: ToolbarGroupVariant | 'filter-group' | 'icon-button-group' | 'button-group'; /** Visibility at various breakpoints. */ - visibility?: { - default?: 'hidden' | 'visible'; - md?: 'hidden' | 'visible'; - lg?: 'hidden' | 'visible'; - xl?: 'hidden' | 'visible'; - '2xl'?: 'hidden' | 'visible'; - }; - /** Deprecated: prop misspelled */ visiblity?: { default?: 'hidden' | 'visible'; md?: 'hidden' | 'visible'; @@ -62,33 +54,13 @@ export interface ToolbarGroupProps extends Omit, class ToolbarGroupWithRef extends React.Component { render() { - const { - visibility, - visiblity, - alignment, - spacer, - spaceItems, - className, - variant, - children, - innerRef, - ...props - } = this.props; - - if (visiblity !== undefined) { - // eslint-disable-next-line no-console - console.warn( - 'The ToolbarGroup visiblity prop has been deprecated. ' + - 'Please use the correctly spelled visibility prop instead.' - ); - } - + const { visiblity, alignment, spacer, spaceItems, className, variant, children, innerRef, ...props } = this.props; return (
{ | 'chip-group' | 'separator'; /** Visibility at various breakpoints. */ - visibility?: { - default?: 'hidden' | 'visible'; - md?: 'hidden' | 'visible'; - lg?: 'hidden' | 'visible'; - xl?: 'hidden' | 'visible'; - '2xl'?: 'hidden' | 'visible'; - }; - /** Deprecated: prop misspelled */ visiblity?: { default?: 'hidden' | 'visible'; md?: 'hidden' | 'visible'; @@ -69,7 +61,6 @@ export interface ToolbarItemProps extends React.HTMLProps { export const ToolbarItem: React.FunctionComponent = ({ className, variant, - visibility, visiblity, alignment, spacer, @@ -81,14 +72,6 @@ export const ToolbarItem: React.FunctionComponent = ({ return ; } - if (visiblity !== undefined) { - // eslint-disable-next-line no-console - console.warn( - 'The ToolbarItem visiblity prop has been deprecated. ' + - 'Please use the correctly spelled visibility prop instead.' - ); - } - return (
= ({ styles.modifiers[ toCamel(variant) as 'bulkSelect' | 'overflowMenu' | 'pagination' | 'searchFilter' | 'label' | 'chipGroup' ], - formatBreakpointMods(visibility || visiblity, styles), + formatBreakpointMods(visiblity, styles), formatBreakpointMods(alignment, styles), formatBreakpointMods(spacer, styles), className diff --git a/packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsx b/packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsx index 4bc849662b1..ee6865a9649 100644 --- a/packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsx +++ b/packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsx @@ -15,14 +15,6 @@ export interface ToolbarToggleGroupProps extends ToolbarGroupProps { /** Controls when filters are shown and when the toggle button is hidden. */ breakpoint: 'md' | 'lg' | 'xl' | '2xl'; /** Visibility at various breakpoints. */ - visibility?: { - default?: 'hidden' | 'visible'; - md?: 'hidden' | 'visible'; - lg?: 'hidden' | 'visible'; - xl?: 'hidden' | 'visible'; - '2xl'?: 'hidden' | 'visible'; - }; - /** Deprecated: prop misspelled */ visiblity?: { default?: 'hidden' | 'visible'; md?: 'hidden' | 'visible'; @@ -68,7 +60,6 @@ export class ToolbarToggleGroup extends React.Component const { toggleIcon, variant, - visibility, visiblity, breakpoint, alignment, @@ -84,14 +75,6 @@ export class ToolbarToggleGroup extends React.Component console.error('ToolbarToggleGroup will not be visible without a breakpoint or toggleIcon.'); } - if (visiblity !== undefined) { - // eslint-disable-next-line no-console - console.warn( - 'The ToolbarToggleGroup visiblity prop has been deprecated. ' + - 'Please use the correctly spelled visibility prop instead.' - ); - } - return ( {({ isExpanded, toggleIsExpanded }) => ( @@ -119,7 +102,7 @@ export class ToolbarToggleGroup extends React.Component | 'showOnXl' | 'showOn_2xl' ], - formatBreakpointMods(visibility || visiblity, styles), + formatBreakpointMods(visiblity, styles), formatBreakpointMods(alignment, styles), formatBreakpointMods(spacer, styles), formatBreakpointMods(spaceItems, styles),