Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/components/Tabs/Tabs.context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const TabsProvider = ({
themeContainerId,
statgrouptheme,
value,
enableArrowNav = false,
enableArrowNav = true,
variant = TabVariant.default,
}: TabsContextProps) => {
const [currentActiveTab, setCurrentActiveTab] = useState(value);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tabs/Tabs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const tabsArgs: Object = {
variant: TabVariant.default,
size: TabSize.Medium,
underlined: false,
enableArrowNav: false,
enableArrowNav: true,
children: tabs.map((tab) => <Tab key={tab.value} {...tab} />),
style: {},
};
Expand Down
6 changes: 3 additions & 3 deletions src/components/Tabs/Tabs.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export interface TabsContextProps {
variant?: TabVariant;
/**
Whether to enable arrow key navigation between tabs
@default false
@default true
*/
enableArrowNav?: boolean;
}
Expand Down Expand Up @@ -229,7 +229,7 @@ export interface ITabsContext {
handleKeyDown?: (event: React.KeyboardEvent, tabIndex: number) => void;
/**
Whether to enable arrow key navigation between tabs
@default false
@default true
*/
enableArrowNav?: boolean;
/**
Expand Down Expand Up @@ -296,7 +296,7 @@ export interface TabProps extends OcBaseProps<HTMLButtonElement> {
ariaControls?: string;
/**
Whether to enable arrow key navigation between tabs
@default false
@default true
*/
enableArrowNav?: boolean;
/*
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tabs/Tabs/AnimatedTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const AnimatedTabs: FC<TabsProps> = React.forwardRef(
style,
underlined = false,
variant = TabVariant.default,
enableArrowNav = false,
enableArrowNav = true,
...rest
},
ref: Ref<HTMLDivElement>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tabs/Tabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Tabs: FC<TabsProps> = React.forwardRef(
themeContainerId,
value,
variant,
enableArrowNav = false,
enableArrowNav = true,
} = props;
const { configContextProps, ...restProps } = props;
return (
Expand Down
48 changes: 24 additions & 24 deletions src/components/Tabs/__snapshots__/Tabs.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports[`Tabs pill tabs large snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -108,7 +108,7 @@ exports[`Tabs pill tabs large snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -152,7 +152,7 @@ exports[`Tabs pill tabs large snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -255,7 +255,7 @@ exports[`Tabs pill tabs medium (default) snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -298,7 +298,7 @@ exports[`Tabs pill tabs medium (default) snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -342,7 +342,7 @@ exports[`Tabs pill tabs medium (default) snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -445,7 +445,7 @@ exports[`Tabs pill tabs medium (set) snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -488,7 +488,7 @@ exports[`Tabs pill tabs medium (set) snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -532,7 +532,7 @@ exports[`Tabs pill tabs medium (set) snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -635,7 +635,7 @@ exports[`Tabs pill tabs small snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -678,7 +678,7 @@ exports[`Tabs pill tabs small snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -722,7 +722,7 @@ exports[`Tabs pill tabs small snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -3720,7 +3720,7 @@ exports[`Tabs tabs alignIcon end 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
className="label"
Expand Down Expand Up @@ -3763,7 +3763,7 @@ exports[`Tabs tabs alignIcon end 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
className="label"
Expand Down Expand Up @@ -3807,7 +3807,7 @@ exports[`Tabs tabs alignIcon end 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
className="label"
Expand Down Expand Up @@ -3911,7 +3911,7 @@ exports[`Tabs tabs alignIcon start 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -3954,7 +3954,7 @@ exports[`Tabs tabs alignIcon start 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -3998,7 +3998,7 @@ exports[`Tabs tabs alignIcon start 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -4107,7 +4107,7 @@ exports[`Tabs tabs badgeContent 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -4155,7 +4155,7 @@ exports[`Tabs tabs badgeContent 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -4204,7 +4204,7 @@ exports[`Tabs tabs badgeContent 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -4312,7 +4312,7 @@ exports[`Tabs tabs snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -4355,7 +4355,7 @@ exports[`Tabs tabs snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down Expand Up @@ -4399,7 +4399,7 @@ exports[`Tabs tabs snapshot 1`] = `
onClick={[Function]}
onKeyDown={[Function]}
role="tab"
tabIndex={0}
tabIndex={-1}
>
<span
aria-hidden={false}
Expand Down