UNPKG

@rcsb/rcsb-saguaro-app

Version:
21 lines 1.11 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import React from "react"; import { Tab, Tabs } from "react-bootstrap"; import * as classes from "../../scss/bootstrap-fv-display.module.scss"; import uniqid from "uniqid"; export class RcsbTabs extends React.Component { constructor(props) { super(props); } render() { return (_jsx("div", { className: classes.bootstrapFvComponentScope, children: _jsx(Tabs, { id: this.props.id, defaultActiveKey: this.props.default, onSelect: (eventKey) => { this.props.onSelect(eventKey); }, children: this.props.tabList.map((tab, n) => (_jsxs(Tab, { eventKey: tab.key, title: tab.title, children: [tab.additionalComponent, _jsx("div", { id: tab.key + RcsbTabs.UI_SUFFIX, style: { height: 20 } }), _jsx("div", { id: tab.key })] }, uniqid(`${tab.key}_`)))) }) })); } componentDidMount() { this.props.onMount(this.props.default); } } RcsbTabs.UI_SUFFIX = "_" + uniqid() + "_UI_DIV"; RcsbTabs.SELECT_SUFFIX = "_" + uniqid() + "_SELECT_DIV"; //# sourceMappingURL=RcsbTabs.js.map