import React, { useState } from 'react'; import CopyToClipBoard from '../CopyToClipBoard'; import { getCLISetRegistry, getCLIChangePassword, getCLISetConfigRegistry } from '../../utils/cli-utils'; import { NODE_MANAGER } from '../../utils/constants'; import { default as Typography } from '../../muiComponents/Heading'; import Tabs from '../../muiComponents/Tabs'; import Tab from '../../muiComponents/Tab'; import { CommandContainer } from './styles'; import { Props, State } from './types'; const RegistryInfoContent: React.FC = props => { const [tabPosition, setTabPosition] = useState(0); const handleChange = (event: React.ChangeEvent<{}>, tabPosition: number): void => { event.preventDefault(); setTabPosition(tabPosition); }; const renderNpmTab = (scope: string, registryUrl: string): JSX.Element => { return ( <> ); }; const renderPnpmTab = (scope: string, registryUrl: string): JSX.Element => { return ( <> ); }; const renderYarnTab = (scope: string, registryUrl: string): JSX.Element => { return ; }; const renderTabs = (): JSX.Element => { const { scope, registryUrl } = props; return ( <> {tabPosition === 0 && {renderNpmTab(scope, registryUrl)}} {tabPosition === 1 && {renderPnpmTab(scope, registryUrl)}} {tabPosition === 2 && {renderYarnTab(scope, registryUrl)}} ); }; /* eslint react/prop-types:0 */ const TabContainer = ({ children }): JSX.Element => { return ( {children} ); }; return
{renderTabs()}
; }; export default RegistryInfoContent;