diff --git a/packages/terra-framework-docs/CHANGELOG.md b/packages/terra-framework-docs/CHANGELOG.md index b59ac171a05..7435a7e874b 100644 --- a/packages/terra-framework-docs/CHANGELOG.md +++ b/packages/terra-framework-docs/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * Added + * Updated customDisplay examples for tabs. * Added `aria-label` and `ariaDescribedBy` examples for `terra-collapsible-menu-view`. * Added examples and test to `terra-table` for row selection mode. * Added initial setup for `terra-compact-interactive-list` documentation. diff --git a/packages/terra-framework-docs/src/terra-dev-site/test/tabs/Tabs/ClosableTab.test.jsx b/packages/terra-framework-docs/src/terra-dev-site/test/tabs/Tabs/ClosableTab.test.jsx index 70418471cd4..c05f1897a98 100644 --- a/packages/terra-framework-docs/src/terra-dev-site/test/tabs/Tabs/ClosableTab.test.jsx +++ b/packages/terra-framework-docs/src/terra-dev-site/test/tabs/Tabs/ClosableTab.test.jsx @@ -32,7 +32,7 @@ const ClosableTab = () => { tabsExample.push( { - label: 'Customized Tab', + label: 'Cutomised Test Tab', customDisplay:
Customized Tab
, key: 'CloseCustomTab', content: 'Custom display', diff --git a/packages/terra-framework-docs/src/terra-dev-site/test/tabs/Tabs/TabsTemplate.module.scss b/packages/terra-framework-docs/src/terra-dev-site/test/tabs/Tabs/TabsTemplate.module.scss index 290ecc9657e..bbf2ba4ca8f 100644 --- a/packages/terra-framework-docs/src/terra-dev-site/test/tabs/Tabs/TabsTemplate.module.scss +++ b/packages/terra-framework-docs/src/terra-dev-site/test/tabs/Tabs/TabsTemplate.module.scss @@ -20,4 +20,8 @@ .content-container-vertical { height: 240px; } + + .custom-display { + color: #f00; + } } diff --git a/packages/terra-framework-docs/src/terra-dev-site/test/tabs/Tabs/VerticalTab.test.jsx b/packages/terra-framework-docs/src/terra-dev-site/test/tabs/Tabs/VerticalTab.test.jsx index 197de855a78..021f082ab91 100644 --- a/packages/terra-framework-docs/src/terra-dev-site/test/tabs/Tabs/VerticalTab.test.jsx +++ b/packages/terra-framework-docs/src/terra-dev-site/test/tabs/Tabs/VerticalTab.test.jsx @@ -29,9 +29,9 @@ const VerticalTab = () => { const customTab = ( + Custom display - + )} label="Custom display" key="tCustomTab" diff --git a/packages/terra-tabs/CHANGELOG.md b/packages/terra-tabs/CHANGELOG.md index e3eaadb54f2..07aac8805e2 100644 --- a/packages/terra-tabs/CHANGELOG.md +++ b/packages/terra-tabs/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * Fixed + * Fixed issue to prefer `customDisplay` prop over `label` prop. * Fixes issue where tab label fails to get updated due to having the same key before and after tab label update. diff --git a/packages/terra-tabs/src/Tabs.jsx b/packages/terra-tabs/src/Tabs.jsx index d671a470b95..285bf9fdea9 100644 --- a/packages/terra-tabs/src/Tabs.jsx +++ b/packages/terra-tabs/src/Tabs.jsx @@ -174,6 +174,7 @@ class Tabs extends React.Component { isDisabled={child.props.isDisabled} isClosable={isClosable} variant="framework" + customDisplay={child.props.customDisplay} />, ); }); diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Interactive_Element.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Interactive_Element.png index d0b2ab683e6..7787c605a18 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Interactive_Element.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Interactive_Element.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Tab.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Tab.png index 368b063f64b..01b91645310 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Tab.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Tab.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/New_Tab_Added.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/New_Tab_Added.png index 17a7a85d3ea..0fb8d6590d5 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/New_Tab_Added.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/New_Tab_Added.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Tab_after_close.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Tab_after_close.png index 3764e7dabeb..1301ce33c9f 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Tab_after_close.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Tab_after_close.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Tabs_with_Add.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Tabs_with_Add.png index ed0c681c3a7..506989c563b 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Tabs_with_Add.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Tabs_with_Add.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Tabs_with_close.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Tabs_with_close.png index ed0c681c3a7..506989c563b 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Tabs_with_close.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/tabs-spec/Tabs_with_close.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Interactive_Element.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Interactive_Element.png index 2e6c6df1847..5d956ef3ed5 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Interactive_Element.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Interactive_Element.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Tab.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Tab.png index e87764e64b9..39ad62224c2 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Tab.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Tab.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/New_Tab_Added.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/New_Tab_Added.png index 30f92df95a1..8719d2e2cd9 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/New_Tab_Added.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/New_Tab_Added.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Tab_after_close.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Tab_after_close.png index 262a3cdfa2c..8b32c7d28e2 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Tab_after_close.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Tab_after_close.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Tabs_with_Add.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Tabs_with_Add.png index 8ec4c914628..0c5fd2ab4df 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Tabs_with_Add.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Tabs_with_Add.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Tabs_with_close.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Tabs_with_close.png index 8ec4c914628..0c5fd2ab4df 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Tabs_with_close.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/tabs-spec/Tabs_with_close.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Interactive_Element.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Interactive_Element.png index b7629f064a1..0f0b12b95e7 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Interactive_Element.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Interactive_Element.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Tab.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Tab.png index 0a8fd5eb69d..b21a6a68a0c 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Tab.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Keyboard_Focus_on_First_Tab.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/New_Tab_Added.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/New_Tab_Added.png index f3b68631390..cddc4c73a39 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/New_Tab_Added.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/New_Tab_Added.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Tab_after_close.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Tab_after_close.png index 0ab89e0cf6e..09b216dc866 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Tab_after_close.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Tab_after_close.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Tabs_with_Add.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Tabs_with_Add.png index f95ad65625e..3da2dd3643b 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Tabs_with_Add.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Tabs_with_Add.png differ diff --git a/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Tabs_with_close.png b/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Tabs_with_close.png index f95ad65625e..3da2dd3643b 100644 Binary files a/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Tabs_with_close.png and b/packages/terra-tabs/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/tabs-spec/Tabs_with_close.png differ