/Tabs

Tab component using react and es2015.

Primary LanguageJavaScript

Tabs

#step1:

---> Open terminal, navigate to the project folder and do "npm install"

#step2:

---> After all the dependecies installed, fire "gulp"

##########################################################

#This is the tab component made using react + es6.

/Sample component using the tab component/ /* import React from 'react'; import Tabs from './components/Tabs';

export default class TabExampleContainer extends React.Component{ constructor(props){ super(props); this.state = { tabComponents: [ { tabTitle: "Tab1", tabContent: "Panel1" }, { tabTitle: "Tab2", tabContent: "Panel2" } ] }; } onTabClick(tabNumber){ alert('tabClicked'); } newTab = () =>{ let newTab ={ tabTitle: "New", tabContent: "New" }; let tabComponents = this.state.tabComponents; console.log('tabComponents',tabComponents); tabComponents.push(newTab); this.setState({ tabComponents: tabComponents }); //alert('createNewTab'); } render(){ let tabComponents = this.state.tabComponents; const maxTabSize = 5; return (

Tab Example

{/Example to add 3 tabs. Accordingly we can increase/}

    </Tabs>
  </div>
)

} } */