Skip to content

Commit ad3ca2f

Browse files
tay1orjonesandreancardonakodiakhq[bot]
authored
fix(tabs): deprecate light prop (#13262)
Co-authored-by: Andrea N. Cardona <cardona.n.andrea@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent f4b3903 commit ad3ca2f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7097,9 +7097,7 @@ Map {
70977097
"leftOverflowButtonProps": Object {
70987098
"type": "object",
70997099
},
7100-
"light": Object {
7101-
"type": "bool",
7102-
},
7100+
"light": [Function],
71037101
"rightOverflowButtonProps": Object {
71047102
"type": "object",
71057103
},

packages/react/src/components/Tabs/Tabs.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { getInteractiveContent } from '../../internal/useNoInteractiveChildren';
2020
import { usePrefix } from '../../internal/usePrefix';
2121
import { keys, match, matches } from '../../internal/keyboard';
2222
import { usePressable } from './usePressable';
23+
import deprecate from '../../prop-types/deprecate';
2324

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

408413
/**
409414
* Provide the props that describe the right overflow button

0 commit comments

Comments
 (0)