mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-07-10 02:23:30 +08:00
33 lines
922 B
React
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>
|
|
</>
|
|
)
|
|
}
|