Update editor switching behaviour for new user split test GitOrigin-RevId: 61ef678ba216323d283bda4cc77d8c465b8c87df
21 lines
663 B
TypeScript
21 lines
663 B
TypeScript
import { TabPane } from 'react-bootstrap'
|
|
import { SettingsTab } from '../../contexts/settings-modal-context'
|
|
import SettingsSection from './settings-section'
|
|
import { Fragment } from 'react'
|
|
|
|
export default function SettingsTabPane({ tab }: { tab: SettingsTab }) {
|
|
const { key, sections } = tab
|
|
return (
|
|
<TabPane eventKey={key} key={key}>
|
|
{sections.map(section => (
|
|
<SettingsSection key={section.key} title={section.title}>
|
|
{section.settings.map(
|
|
({ key, component, hidden }) =>
|
|
!hidden && <Fragment key={key}>{component}</Fragment>
|
|
)}
|
|
</SettingsSection>
|
|
))}
|
|
</TabPane>
|
|
)
|
|
}
|