1 | import * as React from 'react';
|
2 | export var IdContext = /*#__PURE__*/React.createContext(null);
|
3 | export function getMenuId(uuid, eventKey) {
|
4 | if (uuid === undefined) {
|
5 | return null;
|
6 | }
|
7 |
|
8 | return "".concat(uuid, "-").concat(eventKey);
|
9 | }
|
10 | /**
|
11 | * Get `data-menu-id`
|
12 | */
|
13 |
|
14 | export function useMenuId(eventKey) {
|
15 | var id = React.useContext(IdContext);
|
16 | return getMenuId(id, eventKey);
|
17 | } |
\ | No newline at end of file |