Skip to content

Commit

Permalink
fix(tabs): deprecate light prop (#13262)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrea N. Cardona <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 9, 2023
1 parent f4b3903 commit ad3ca2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7097,9 +7097,7 @@ Map {
"leftOverflowButtonProps": Object {
"type": "object",
},
"light": Object {
"type": "bool",
},
"light": [Function],
"rightOverflowButtonProps": Object {
"type": "object",
},
Expand Down
7 changes: 6 additions & 1 deletion packages/react/src/components/Tabs/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { getInteractiveContent } from '../../internal/useNoInteractiveChildren';
import { usePrefix } from '../../internal/usePrefix';
import { keys, match, matches } from '../../internal/keyboard';
import { usePressable } from './usePressable';
import deprecate from '../../prop-types/deprecate';

// Used to manage the overall state of the Tabs
const TabsContext = React.createContext();
Expand Down Expand Up @@ -403,7 +404,11 @@ TabList.propTypes = {
/**
* Specify whether or not to use the light component variant
*/
light: PropTypes.bool,
light: deprecate(
PropTypes.bool,
'The `light` prop for `TabList` has ' +
'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'
),

/**
* Provide the props that describe the right overflow button
Expand Down

0 comments on commit ad3ca2f

Please sign in to comment.