Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tabs): deprecate light prop #13262

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7088,9 +7088,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