settings-tab-pane.tsx 676 B

1234567891011121314151617181920
  1. import { TabPane } from 'react-bootstrap'
  2. import { SettingsTab } from '../../ide-redesign/contexts/settings-modal-context'
  3. import SettingsSection from './settings-section'
  4. import { Fragment } from 'react'
  5. export default function SettingsTabPane({ tab }: { tab: SettingsTab }) {
  6. const { key, sections } = tab
  7. return (
  8. <TabPane eventKey={key} key={key}>
  9. {sections.map(section => (
  10. <SettingsSection key={section.key} title={section.title}>
  11. {section.settings.map(
  12. ({ key, component, hidden }) =>
  13. !hidden && <Fragment key={key}>{component}</Fragment>
  14. )}
  15. </SettingsSection>
  16. ))}
  17. </TabPane>
  18. )
  19. }