import React, { Component } from 'react';
import { css } from 'emotion';
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 }): JSX.Element {
return (
{children}
);
}
class RegistryInfoContent extends Component {
public state = {
tabPosition: 0,
};
public render(): JSX.Element {
return {this.renderTabs()}
;
}
private handleChange = (event: React.ChangeEvent<{}>, tabPosition: number) => {
event.preventDefault();
this.setState({ tabPosition });
};
private renderTabs(): JSX.Element {
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)}}
);
}
private renderNpmTab(scope: string, registryUrl: string): JSX.Element {
return (
);
}
private renderPNpmTab(scope: string, registryUrl: string): JSX.Element {
return (
);
}
private renderYarnTab(scope: string, registryUrl: string): JSX.Element {
return (
);
}
}
export default RegistryInfoContent;