import React, { useState } from "react"; import { ComponentStory } from "@storybook/react"; import { StoryLayout } from "../../../.storybook/StoryComponents"; import { Tabs } from "./Tabs"; import { TabsDocs } from "./TabsDocs"; import { action } from "@storybook/addon-actions"; import styled from "styled-components"; export default { title: "Molecules/Tabs", component: Tabs, args: { disabled: false, vertical: false, }, parameters: { docs: { page: TabsDocs, }, }, }; export const Basic: ComponentStory = () => { const [activeKey, setActiveKey] = useState("1"); const onChange = (value: string) => setActiveKey(value); const tabClickAction = action("Tab was clicked"); const onTabClick = (value: string) => tabClickAction(value); return ( Content of Tab Pane 1 Content of Tab Pane 2 Content of Tab Pane 3 ); }; export const WithBadge: ComponentStory = () => { const [activeKey, setActiveKey] = useState("1"); const onChange = (value: string) => setActiveKey(value); const tabClickAction = action("Tab was clicked"); const onTabClick = (value: string) => tabClickAction(value); return ( } key="1" > Content of Tab Pane 1 Content of Tab Pane 2 Content of Tab Pane 3 ); }; Basic.parameters = { docs: { storyDescription: "Базовый пример использования компонента", }, };