Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

backstage-ui/backstage-tabs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backstage-tabs

Backstage React tabs component

Installing

$ npm install backstage-tabs --save

Required Props

  • tabs: Array of objects to set all tab items of Tabs component:
    • label: label displayed on the tab,
    • value: the identifier of the tab.
  • activeTab: current active tab;

Props

  • onClickTab: callback called when the user clicks any tab;
  • className: custom CSS class to the component;
  • large: shows the component in a large size;
  • small: shows the component in a small size;

Example

import React from 'react';
import { render } from 'react-dom';
import Dropdown from 'backstage-tabs';


const TABS = [
  {value: "grape", label: "Grape"},
  {value: "apple", label: "Apple"},
  {value: "mango", label: "Mango"},
  {value: "tangerine", label: "Tangerine"},
];

render(<Tabs options={TABS} activeTab='grape' />, document.getElementById('container'));

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published