Skip to content

Commit 6967b7c

Browse files
abbeyhrttay1orjoneskodiakhq[bot]
authored
feat(react): add ContainedTab and ContainedTabs (#9974)
* feat(react): add ContainedTab and ContainedTabs * fix(react): update snapshots Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent fe9428a commit 6967b7c

File tree

10 files changed

+962
-135
lines changed

10 files changed

+962
-135
lines changed

packages/carbon-react/src/components/Tabs/Tabs.stories.js

Lines changed: 0 additions & 127 deletions
This file was deleted.

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

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5958,6 +5958,51 @@ Map {
59585958
},
59595959
},
59605960
},
5961+
"unstable_ContainedTab" => Object {
5962+
"$$typeof": Symbol(react.forward_ref),
5963+
"propTypes": Object {
5964+
"className": Object {
5965+
"type": "string",
5966+
},
5967+
"disabled": Object {
5968+
"type": "bool",
5969+
},
5970+
"handleTabClick": Object {
5971+
"type": "func",
5972+
},
5973+
"handleTabKeyDown": Object {
5974+
"type": "func",
5975+
},
5976+
"id": Object {
5977+
"type": "string",
5978+
},
5979+
"index": Object {
5980+
"type": "number",
5981+
},
5982+
"label": Object {
5983+
"type": "node",
5984+
},
5985+
"onClick": Object {
5986+
"type": "func",
5987+
},
5988+
"onKeyDown": Object {
5989+
"type": "func",
5990+
},
5991+
"renderButton": Object {
5992+
"type": "func",
5993+
},
5994+
"renderContent": Object {
5995+
"type": "func",
5996+
},
5997+
"selected": Object {
5998+
"type": "bool",
5999+
},
6000+
"tabIndex": Object {
6001+
"type": "number",
6002+
},
6003+
},
6004+
"render": [Function],
6005+
},
59616006
"TabContent" => Object {
59626007
"defaultProps": Object {
59636008
"selected": false,
@@ -6056,6 +6101,55 @@ Map {
60566101
},
60576102
},
60586103
},
6104+
"unstable_ContainedTabs" => Object {
6105+
"$$typeof": Symbol(react.forward_ref),
6106+
"propTypes": Object {
6107+
"children": Object {
6108+
"type": "node",
6109+
},
6110+
"className": Object {
6111+
"type": "string",
6112+
},
6113+
"hidden": Object {
6114+
"type": "bool",
6115+
},
6116+
"leftOverflowButtonProps": Object {
6117+
"type": "object",
6118+
},
6119+
"light": [Function],
6120+
"onClick": Object {
6121+
"type": "func",
6122+
},
6123+
"onKeyDown": Object {
6124+
"type": "func",
6125+
},
6126+
"onSelectionChange": Object {
6127+
"type": "func",
6128+
},
6129+
"rightOverflowButtonProps": Object {
6130+
"type": "object",
6131+
},
6132+
"scrollIntoView": Object {
6133+
"type": "bool",
6134+
},
6135+
"selected": Object {
6136+
"type": "number",
6137+
},
6138+
"selectionMode": Object {
6139+
"args": Array [
6140+
Array [
6141+
"automatic",
6142+
"manual",
6143+
],
6144+
],
6145+
"type": "oneOf",
6146+
},
6147+
"tabContentClassName": Object {
6148+
"type": "string",
6149+
},
6150+
},
6151+
"render": [Function],
6152+
},
60596153
"Tag" => Object {
60606154
"propTypes": Object {
60616155
"children": Object {

packages/react/src/__tests__/index-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ Array [
199199
"TooltipDefinition",
200200
"TooltipIcon",
201201
"UnorderedList",
202+
"unstable_ContainedTab",
203+
"unstable_ContainedTabs",
202204
"unstable_FeatureFlags",
203205
"unstable_HStack",
204206
"unstable_Heading",

packages/react/src/components/Tab/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
import * as FeatureFlags from '@carbon/feature-flags';
99
import { default as TabNext } from './next/Tab';
1010
import { default as TabClassic } from './Tab';
11+
import ContainedTab from './next/ContainedTab';
1112

1213
const Tab = FeatureFlags.enabled('enable-v11-release') ? TabNext : TabClassic;
1314

15+
export { ContainedTab };
16+
1417
export default Tab;

0 commit comments

Comments
 (0)