From e5d4dbc82b949b118cd70b2b31d292c129932eb7 Mon Sep 17 00:00:00 2001 From: Nitin Ramnani Date: Mon, 17 Feb 2025 12:08:43 +0530 Subject: [PATCH] Added stories for HeaderTabs Component Signed-off-by: Nitin Ramnani --- .../layout/HeaderTabs/HeaderTabs.stories.tsx | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 packages/core-components/src/layout/HeaderTabs/HeaderTabs.stories.tsx diff --git a/packages/core-components/src/layout/HeaderTabs/HeaderTabs.stories.tsx b/packages/core-components/src/layout/HeaderTabs/HeaderTabs.stories.tsx new file mode 100644 index 0000000000..4c3b1235fd --- /dev/null +++ b/packages/core-components/src/layout/HeaderTabs/HeaderTabs.stories.tsx @@ -0,0 +1,87 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import React from 'react'; +import { HeaderTabs } from './HeaderTabs'; + +export default { + title: 'Layout/HeaderTabs', + component: HeaderTabs, +}; + +export const SingleTab = (args: any) => ; +SingleTab.args = { + tabs: [ + { + id: 'tab1', + label: 'Tab 1', + }, + ], +}; + +export const MultipleTabs = (args: any) => ; + +MultipleTabs.args = { + tabs: [ + { + id: 'tab1', + label: 'Tab 1', + }, + { + id: 'tab2', + label: 'Tab 2', + }, + { + id: 'tab3', + label: 'Tab 3', + }, + { + id: 'tab4', + label: 'Tab 4', + }, + { + id: 'tab5', + label: 'Tab 5', + }, + ], +}; + +export const SelectedTab = (args: any) => ; + +SelectedTab.args = { + tabs: [ + { + id: 'tab1', + label: 'Tab 1', + }, + { + id: 'tab2', + label: 'Tab 2', + }, + { + id: 'tab3', + label: 'Tab 3', + }, + { + id: 'tab4', + label: 'Tab 4', + }, + { + id: 'tab5', + label: 'Tab 5', + }, + ], + selectedIndex: 1, +};