Files
chatGPTBox/src/popup/sections/ModulesPart.jsx
T
2023-04-29 13:39:32 +08:00

33 lines
922 B
React

import { useTranslation } from 'react-i18next'
import PropTypes from 'prop-types'
import { Tab, TabList, TabPanel, Tabs } from 'react-tabs'
import { SelectionTools } from './SelectionTools'
import { SiteAdapters } from './SiteAdapters'
ModulesPart.propTypes = {
config: PropTypes.object.isRequired,
updateConfig: PropTypes.func.isRequired,
}
export function ModulesPart({ config, updateConfig }) {
const { t } = useTranslation()
return (
<>
<Tabs selectedTabClassName="popup-tab--selected">
<TabList>
<Tab className="popup-tab">{t('Selection Tools')}</Tab>
<Tab className="popup-tab">{t('Sites')}</Tab>
</TabList>
<TabPanel>
<SelectionTools config={config} updateConfig={updateConfig} />
</TabPanel>
<TabPanel>
<SiteAdapters config={config} updateConfig={updateConfig} />
</TabPanel>
</Tabs>
</>
)
}