DocSpace-client/packages/components/tabs-container
2023-11-13 21:01:20 +05:00
..
index.js Fixed paths 2023-11-10 11:20:02 +04:00
README.md Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
styled-tabs-container.js Fix Bug 65062 - Settings: Developer Tools. The text of the "Code to insert" button is cut off in RTL mode 2023-11-13 21:01:20 +05:00
tabs-container.mdx Web: Components: fixed storybook blocks import 2023-05-31 20:00:04 +05:00
tabs-container.stories.js Web: Components: Fix wrong LTR TabContainer titles in RTL mode in storybook 2023-07-10 15:21:07 +02:00
tabs-container.test.js Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00

TabContainer

Custom Tabs menu

Usage

import TabContainer from "@docspace/components/tabs-container";
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