UNPKG

@gravity-ui/uikit

Version:

Gravity UI base styling and components

15 lines (14 loc) 810 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Toc = void 0; const tslib_1 = require("tslib"); const jsx_runtime_1 = require("react/jsx-runtime"); const React = tslib_1.__importStar(require("react")); const cn_1 = require("../utils/cn.js"); const TocSections_1 = require("./TocSections/index.js"); const b = (0, cn_1.block)('toc'); exports.Toc = React.forwardRef(function Toc(props, ref) { const { value: activeValue, items, className, onUpdate, qa, onItemClick } = props; return ((0, jsx_runtime_1.jsx)("nav", { className: b(null, className), ref: ref, "data-qa": qa, children: (0, jsx_runtime_1.jsx)(TocSections_1.TocSections, { items: items, value: activeValue, onUpdate: onUpdate, depth: 1, onItemClick: onItemClick }) })); }); //# sourceMappingURL=Toc.js.map