DocSpace-client/packages/shared/components/tabs-container
2024-05-29 12:53:10 +03:00
..
index.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
README.md Shared:Components:TabsContainer: rewrite to typescript 2023-12-26 11:21:01 +03:00
TabsContainer.mdx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
TabsContainer.stories.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
TabsContainer.styled.tsx Shared: TabsContainer: fix styles 2024-05-29 12:53:10 +03:00
TabsContainer.test.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
TabsContainer.tsx Shared: fix ts problems 2024-03-22 10:20:39 +03:00
TabsContainer.types.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00

TabContainer

Custom Tabs menu

Usage

import { TabContainer } from "@docspace/shared/components";
const array_items = [
  {
    key: "0",
    title: "Title1",
    content: (
      <div>
        <div>
          <button>BUTTON</button>
        </div>
        <div>
          <button>BUTTON</button>
        </div>
        <div>
          <button>BUTTON</button>
        </div>
      </div>
    ),
  },
  {
    key: "1",
    title: "Title2",
    content: (
      <div>
        <div>
          <label>LABEL</label>
        </div>
        <div>
          <label>LABEL</label>
        </div>
        <div>
          <label>LABEL</label>
        </div>
      </div>
    ),
  },
  {
    key: "2",
    title: "Title3",
    content: (
      <div>
        <div>
          <input></input>
        </div>
        <div>
          <input></input>
        </div>
        <div>
          <input></input>
        </div>
      </div>
    ),
  },
];
<TabContainer>{array_items}</TabContainer>

TabContainer Properties

Props Type Required Values Default Description
isDisabled boolean - - - Disable the TabContainer
selectedItem number - - 0 Selected title of tabs container
onSelect func - - - Triggered when a title is selected

Array Items Properties

Props Type Required Values Default Description
id string - - Index of object array
title string - - Tabs title
content object - - Content in Tab