UNPKG

@gravity-ui/uikit

Version:

Gravity UI base styling and components

13 lines (12 loc) 712 B
import { jsx as _jsx } from "react/jsx-runtime"; import * as React from 'react'; import { useDefaultProps } from "../theme/useDefaultProps.js"; import { block } from "../utils/cn.js"; import { TocSections } from "./TocSections/index.js"; const b = block('toc'); export const Toc = React.forwardRef(function Toc(rawProps, ref) { const props = useDefaultProps('Toc', rawProps); const { value: activeValue, items, className, onUpdate, qa, onItemClick } = props; return (_jsx("nav", { className: b(null, className), ref: ref, "data-qa": qa, children: _jsx(TocSections, { items: items, value: activeValue, onUpdate: onUpdate, depth: 1, onItemClick: onItemClick }) })); }); //# sourceMappingURL=Toc.js.map