1 | "use client";
|
2 |
|
3 | import * as React from 'react';
|
4 | import { useContext } from 'react';
|
5 | import Collapse from './Collapse';
|
6 | import { useBootstrapPrefix } from './ThemeProvider';
|
7 | import NavbarContext from './NavbarContext';
|
8 | import { jsx as _jsx } from "react/jsx-runtime";
|
9 | const NavbarCollapse = React.forwardRef(({
|
10 | children,
|
11 | bsPrefix,
|
12 | ...props
|
13 | }, ref) => {
|
14 | bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-collapse');
|
15 | const context = useContext(NavbarContext);
|
16 | return _jsx(Collapse, {
|
17 | in: !!(context && context.expanded),
|
18 | ...props,
|
19 | children: _jsx("div", {
|
20 | ref: ref,
|
21 | className: bsPrefix,
|
22 | children: children
|
23 | })
|
24 | });
|
25 | });
|
26 | NavbarCollapse.displayName = 'NavbarCollapse';
|
27 | export default NavbarCollapse; |
\ | No newline at end of file |