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

remove deprecated HorizontalTabs/VerticalTabs #1388

Merged
merged 1 commit into from
Jul 5, 2023
Merged
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
5 changes: 5 additions & 0 deletions .changeset/violet-laws-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@itwin/itwinui-react': major
---

Removed deprecated `HorizontalTabs` and `VerticalTabs` (replaced by `orientation` prop in `Tabs`).
44 changes: 0 additions & 44 deletions packages/itwinui-react/src/core/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,6 @@ export type TabsProps = {
TabsTypeProps &
TabsOverflowProps;

/**
* @deprecated Since v2, use `TabProps` with `Tabs`
*/
type HorizontalTabsProps = Omit<TabsProps, 'orientation'>;

/**
* @deprecated Since v2, use `TabProps` with `Tabs`
*/
type VerticalTabsProps = Omit<TabsProps, 'orientation' | 'type'> & {
type?: 'default' | 'borderless';
};

/**
* Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy.
* @example
Expand Down Expand Up @@ -619,36 +607,4 @@ export const Tabs = (props: TabsProps) => {
);
};

/**
* @deprecated Since v2, directly use `Tabs` with `orientation: 'horizontal'`
*
* Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy.
* @example
* const tabs = [
* <Tab label='Label 1' sublabel='First tab' />,
* <Tab label='Label 2' sublabel='Active tab' />,
* <Tab label='Label 3' sublabel='Disabled tab' disabled icon={<SvgPlaceholder />} />,
* ];
* <HorizontalTabs labels={tabs} activeIndex={1}>Tabpanel content</HorizontalTabs>
*/
export const HorizontalTabs = (props: HorizontalTabsProps) => (
<Tabs orientation='horizontal' {...props} />
);

/**
* @deprecated Since v2, directly use `Tabs` with `orientation: 'vertical'`
*
* Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy.
* @example
* const tabs = [
* <Tab label='Label 1' sublabel='First tab' />,
* <Tab label='Label 2' sublabel='Active tab' />,
* <Tab label='Label 3' sublabel='Disabled tab' disabled icon={<SvgPlaceholder />} />,
* ];
* <VerticalTabs labels={tabs} activeIndex={1}>Tabpanel content</VerticalTabs>
*/
export const VerticalTabs = (props: VerticalTabsProps) => (
<Tabs orientation='vertical' {...props} />
);

export default Tabs;
2 changes: 1 addition & 1 deletion packages/itwinui-react/src/core/Tabs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
export { Tabs, VerticalTabs, HorizontalTabs } from './Tabs.js';
export { Tabs } from './Tabs.js';

export { Tab } from './Tab.js';
2 changes: 1 addition & 1 deletion packages/itwinui-react/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export { List, ListItem } from './List/index.js';

export { TransferList } from './TransferList/index.js';

export { VerticalTabs, Tabs, Tab, HorizontalTabs } from './Tabs/index.js';
export { Tabs, Tab } from './Tabs/index.js';

export {
InformationPanel,
Expand Down