import React, { Component } from 'react'; import { Props, State } from './types'; import { CommandContainer } from './styles'; import CopyToClipBoard from '../CopyToClipBoard'; import Tabs from '@material-ui/core/Tabs'; import Tab from '@material-ui/core/Tab'; import Typography from '@material-ui/core/Typography'; import { getCLISetRegistry, getCLIChangePassword, getCLISetConfigRegistry } from '../../utils/cli-utils'; import { NODE_MANAGER } from '../../utils/constants'; /* eslint react/prop-types:0 */ function TabContainer({ children }) { return ( {children} ); } class RegistryInfoContent extends Component { state = { tabPosition: 0, }; render() { return
{this.renderTabs()}
; } renderTabs() { const { scope, registryUrl } = this.props; const { tabPosition } = this.state; return ( {tabPosition === 0 && {this.renderNpmTab(scope, registryUrl)}} {tabPosition === 1 && {this.renderPNpmTab(scope, registryUrl)}} {tabPosition === 2 && {this.renderYarnTab(scope, registryUrl)}} ); } renderNpmTab(scope: string, registryUrl: string) { return ( ); } renderPNpmTab(scope: string, registryUrl: string) { return ( ); } renderYarnTab(scope: string, registryUrl: string) { return ( ); } handleChange = (event: any, tabPosition: number) => { event.preventDefault(); this.setState({ tabPosition }); }; } export default RegistryInfoContent;