UNPKG

tdesign-react

Version:
20 lines (16 loc) 607 B
/** * tdesign v1.15.1 * (c) 2025 tdesign * @license MIT */ import React from 'react'; import { checkIsSubMenu } from './checkMenuType.js'; import _checkSubMenuChildrenActive from './checkSubMenuChildrenActive.js'; import './type.js'; var checkSubMenuActive = function checkSubMenuActive(children, active) { return React.Children.toArray(children).find(function (child) { return checkIsSubMenu(child) && (child.props.value === active || _checkSubMenuChildrenActive(child.props.children, active)); }); }; export { checkSubMenuActive as default }; //# sourceMappingURL=checkSubMenuActive.js.map