@teambit/component 0.0.851 → 0.0.852
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +0 -6
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/top-bar-nav/top-bar-nav.d.ts +2 -3
- package/dist/ui/top-bar-nav/top-bar-nav.js +8 -2
- package/dist/ui/top-bar-nav/top-bar-nav.js.map +1 -1
- package/package-tar/teambit-component-0.0.852.tgz +0 -0
- package/package.json +14 -14
- package/{preview-1662990602352.js → preview-1663069999927.js} +2 -2
- package/ui/index.ts +1 -1
- package/ui/top-bar-nav/top-bar-nav.tsx +9 -4
- package/package-tar/teambit-component-0.0.851.tgz +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export { componentFields, componentIdFields, componentOverviewFields } from './u
|
|
|
25
25
|
export { ConsumePlugin } from './ui/menu';
|
|
26
26
|
export { RegisteredComponentRoute, ComponentUrlParams } from './component.route';
|
|
27
27
|
export { ComponentModel, ComponentModelProps } from './ui/component-model';
|
|
28
|
-
export { TopBarNav
|
|
28
|
+
export { TopBarNav } from './ui/top-bar-nav';
|
|
29
29
|
export type { ShowFragment, ShowRow, ShowJSONRow } from './show';
|
|
30
30
|
export { default as Config } from './config';
|
|
31
31
|
export { useComponent } from './ui';
|
package/dist/index.js
CHANGED
|
@@ -167,12 +167,6 @@ Object.defineProperty(exports, "TopBarNav", {
|
|
|
167
167
|
return _topBarNav().TopBarNav;
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
|
-
Object.defineProperty(exports, "TopBarNavProps", {
|
|
171
|
-
enumerable: true,
|
|
172
|
-
get: function () {
|
|
173
|
-
return _topBarNav().TopBarNavProps;
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
170
|
Object.defineProperty(exports, "componentFields", {
|
|
177
171
|
enumerable: true,
|
|
178
172
|
get: function () {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ComponentAspect"],"sources":["index.ts"],"sourcesContent":["import { ComponentAspect } from './component.aspect';\n\nexport { useComponentHost } from './host';\nexport { Component, InvalidComponent } from './component';\nexport { ComponentID } from '@teambit/component-id';\nexport { default as ComponentFS } from './component-fs';\nexport type { default as ComponentConfig } from './config';\nexport type { ComponentFactory, ResolveAspectsOptions } from './component-factory';\nexport type { AspectList } from './aspect-list';\nexport { AspectEntry, AspectData, ResolveComponentIdFunc } from './aspect-entry';\n// TODO: check why it's not working when using the index in snap dir like this:\n// export { Snap, Author } from './snap';\nexport { Snap, SnapProps } from './snap/snap';\nexport type { Author } from './snap/author';\n// TODO: check why it's not working when using the index in tag dir like this:\n// export { Tag } from './tag';\nexport { Tag, TagProps } from './tag/tag';\nexport type { IComponent } from './component-interface';\nexport { State } from './state';\nexport type { Hash } from './hash';\nexport { TagMap } from './tag-map';\nexport { ComponentMap } from './component-map';\nexport type { ComponentMain } from './component.main.runtime';\nexport type { ComponentUI } from './component.ui.runtime';\nexport { Section } from './section';\nexport { ComponentContext, ComponentDescriptorContext, useComponentDescriptor } from './ui/context/component-context';\nexport type { ComponentProviderProps, ComponentDescriptorProviderProps } from './ui/context';\nexport { ComponentProvider, ComponentDescriptorProvider } from './ui/context';\nexport { componentFields, componentIdFields, componentOverviewFields } from './ui';\nexport { ConsumePlugin } from './ui/menu';\nexport { RegisteredComponentRoute, ComponentUrlParams } from './component.route';\nexport { ComponentModel, ComponentModelProps } from './ui/component-model';\nexport { TopBarNav
|
|
1
|
+
{"version":3,"names":["ComponentAspect"],"sources":["index.ts"],"sourcesContent":["import { ComponentAspect } from './component.aspect';\n\nexport { useComponentHost } from './host';\nexport { Component, InvalidComponent } from './component';\nexport { ComponentID } from '@teambit/component-id';\nexport { default as ComponentFS } from './component-fs';\nexport type { default as ComponentConfig } from './config';\nexport type { ComponentFactory, ResolveAspectsOptions } from './component-factory';\nexport type { AspectList } from './aspect-list';\nexport { AspectEntry, AspectData, ResolveComponentIdFunc } from './aspect-entry';\n// TODO: check why it's not working when using the index in snap dir like this:\n// export { Snap, Author } from './snap';\nexport { Snap, SnapProps } from './snap/snap';\nexport type { Author } from './snap/author';\n// TODO: check why it's not working when using the index in tag dir like this:\n// export { Tag } from './tag';\nexport { Tag, TagProps } from './tag/tag';\nexport type { IComponent } from './component-interface';\nexport { State } from './state';\nexport type { Hash } from './hash';\nexport { TagMap } from './tag-map';\nexport { ComponentMap } from './component-map';\nexport type { ComponentMain } from './component.main.runtime';\nexport type { ComponentUI } from './component.ui.runtime';\nexport { Section } from './section';\nexport { ComponentContext, ComponentDescriptorContext, useComponentDescriptor } from './ui/context/component-context';\nexport type { ComponentProviderProps, ComponentDescriptorProviderProps } from './ui/context';\nexport { ComponentProvider, ComponentDescriptorProvider } from './ui/context';\nexport { componentFields, componentIdFields, componentOverviewFields } from './ui';\nexport { ConsumePlugin } from './ui/menu';\nexport { RegisteredComponentRoute, ComponentUrlParams } from './component.route';\nexport { ComponentModel, ComponentModelProps } from './ui/component-model';\nexport { TopBarNav } from './ui/top-bar-nav';\nexport type { ShowFragment, ShowRow, ShowJSONRow } from './show';\nexport { default as Config } from './config';\nexport { useComponent } from './ui';\n\n// export { AspectList } from './aspect-list';\n// export { AspectEntry } from './aspect-entry';\nexport { ComponentAspect };\nexport default ComponentAspect;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAIA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAIA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAxBA;AACA;AAGA;AACA;AAsBA;AACA;eAEeA,4B"}
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export { Component } from './component';
|
|
|
2
2
|
export { ComponentModel, ComponentModelProps } from './component-model';
|
|
3
3
|
export { ComponentContext, ComponentProvider } from './context';
|
|
4
4
|
export { useComponent } from './use-component';
|
|
5
|
-
export { TopBarNav
|
|
5
|
+
export { TopBarNav } from './top-bar-nav';
|
|
6
6
|
export { componentIdFields, componentOverviewFields, componentFields } from './use-component-query';
|
|
7
7
|
export { useIdFromLocation } from './use-component-from-location';
|
package/dist/ui/index.js
CHANGED
|
@@ -39,12 +39,6 @@ Object.defineProperty(exports, "TopBarNav", {
|
|
|
39
39
|
return _topBarNav().TopBarNav;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
Object.defineProperty(exports, "TopBarNavProps", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _topBarNav().TopBarNavProps;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
42
|
Object.defineProperty(exports, "componentFields", {
|
|
49
43
|
enumerable: true,
|
|
50
44
|
get: function () {
|
package/dist/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { Component } from './component';\nexport { ComponentModel, ComponentModelProps } from './component-model';\nexport { ComponentContext, ComponentProvider } from './context';\nexport { useComponent } from './use-component';\nexport { TopBarNav
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { Component } from './component';\nexport { ComponentModel, ComponentModelProps } from './component-model';\nexport { ComponentContext, ComponentProvider } from './context';\nexport { useComponent } from './use-component';\nexport { TopBarNav } from './top-bar-nav';\nexport { componentIdFields, componentOverviewFields, componentFields } from './use-component-query';\nexport { useIdFromLocation } from './use-component-from-location';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export declare
|
|
4
|
-
export declare function TopBarNav({ href, className, activeClassName, children, ...rest }: TopBarNavProps): JSX.Element;
|
|
2
|
+
import { NavPluginProps } from '../menu/nav-plugin';
|
|
3
|
+
export declare function TopBarNav({ href, className, activeClassName, children, displayName, ...rest }: NavPluginProps): JSX.Element;
|
|
@@ -84,13 +84,19 @@ function TopBarNav(_ref) {
|
|
|
84
84
|
href,
|
|
85
85
|
className,
|
|
86
86
|
activeClassName,
|
|
87
|
-
children
|
|
87
|
+
children,
|
|
88
|
+
displayName
|
|
88
89
|
} = _ref,
|
|
89
|
-
rest = (0, _objectWithoutProperties2().default)(_ref, ["href", "className", "activeClassName", "children"]);
|
|
90
|
+
rest = (0, _objectWithoutProperties2().default)(_ref, ["href", "className", "activeClassName", "children", "displayName"]);
|
|
90
91
|
const {
|
|
91
92
|
search
|
|
92
93
|
} = (0, _reactRouterDom().useLocation)(); // sticky query params
|
|
94
|
+
// @hack - this is so that the displayName will not pass to the link and cause a warning in the console.
|
|
95
|
+
// it is used for component page nav link widgets (code, aspects etc),
|
|
96
|
+
// but not for regular menu links (overview, compositions, etc).
|
|
97
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
93
98
|
|
|
99
|
+
const preventPassingDisplayNameToLink = displayName;
|
|
94
100
|
const target = `${href}${search}`;
|
|
95
101
|
return /*#__PURE__*/_react().default.createElement(_baseReactNavigation().Link, (0, _extends2().default)({}, rest, {
|
|
96
102
|
className: (0, _classnames().default)(className, _topBarNavModule().default.topBarLink),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TopBarNav","href","className","activeClassName","children","rest","search","useLocation","target","classnames","styles","topBarLink","active"],"sources":["top-bar-nav.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport { useLocation } from 'react-router-dom';\nimport { Link
|
|
1
|
+
{"version":3,"names":["TopBarNav","href","className","activeClassName","children","displayName","rest","search","useLocation","preventPassingDisplayNameToLink","target","classnames","styles","topBarLink","active"],"sources":["top-bar-nav.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport { useLocation } from 'react-router-dom';\nimport { Link } from '@teambit/base-react.navigation.link';\nimport { NavPluginProps } from '../menu/nav-plugin';\n\nimport styles from './top-bar-nav.module.scss';\n\nexport function TopBarNav({ href, className, activeClassName, children, displayName, ...rest }: NavPluginProps) {\n const { search } = useLocation(); // sticky query params\n\n // @hack - this is so that the displayName will not pass to the link and cause a warning in the console.\n // it is used for component page nav link widgets (code, aspects etc),\n // but not for regular menu links (overview, compositions, etc).\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const preventPassingDisplayNameToLink = displayName;\n\n const target = `${href}${search}`;\n\n return (\n <Link\n {...rest}\n className={classnames(className, styles.topBarLink)}\n activeClassName={classnames(activeClassName, styles.active)}\n href={target}\n >\n <div>{children}</div>\n </Link>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,SAASA,SAAT,OAAyG;EAAA,IAAtF;IAAEC,IAAF;IAAQC,SAAR;IAAmBC,eAAnB;IAAoCC,QAApC;IAA8CC;EAA9C,CAAsF;EAAA,IAAxBC,IAAwB;EAC9G,MAAM;IAAEC;EAAF,IAAa,IAAAC,6BAAA,GAAnB,CAD8G,CAC5E;EAElC;EACA;EACA;EACA;;EACA,MAAMC,+BAA+B,GAAGJ,WAAxC;EAEA,MAAMK,MAAM,GAAI,GAAET,IAAK,GAAEM,MAAO,EAAhC;EAEA,oBACE,+BAAC,2BAAD,+BACMD,IADN;IAEE,SAAS,EAAE,IAAAK,qBAAA,EAAWT,SAAX,EAAsBU,0BAAA,CAAOC,UAA7B,CAFb;IAGE,eAAe,EAAE,IAAAF,qBAAA,EAAWR,eAAX,EAA4BS,0BAAA,CAAOE,MAAnC,CAHnB;IAIE,IAAI,EAAEJ;EAJR,iBAME,4CAAMN,QAAN,CANF,CADF;AAUD"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.852",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/component/component",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "component",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.852"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@teambit/any-fs": "0.0.5",
|
|
@@ -23,26 +23,26 @@
|
|
|
23
23
|
"core-js": "^3.0.0",
|
|
24
24
|
"@teambit/component-id": "0.0.417",
|
|
25
25
|
"@teambit/ui-foundation.ui.menu-widget-icon": "0.0.494",
|
|
26
|
-
"@teambit/aspect-loader": "0.0.
|
|
26
|
+
"@teambit/aspect-loader": "0.0.852",
|
|
27
27
|
"@teambit/legacy-bit-id": "0.0.414",
|
|
28
28
|
"@teambit/toolbox.path.match-patterns": "0.0.7",
|
|
29
29
|
"@teambit/toolbox.string.capitalize": "0.0.489",
|
|
30
30
|
"@teambit/harmony": "0.3.3",
|
|
31
31
|
"@teambit/cli": "0.0.566",
|
|
32
32
|
"@teambit/express": "0.0.664",
|
|
33
|
-
"@teambit/graphql": "0.0.
|
|
33
|
+
"@teambit/graphql": "0.0.852",
|
|
34
34
|
"@teambit/bit-error": "0.0.400",
|
|
35
35
|
"@teambit/base-react.navigation.link": "2.0.27",
|
|
36
|
-
"@teambit/command-bar": "0.0.
|
|
36
|
+
"@teambit/command-bar": "0.0.852",
|
|
37
37
|
"@teambit/component.ui.deprecation-icon": "0.0.500",
|
|
38
|
-
"@teambit/preview": "0.0.
|
|
39
|
-
"@teambit/pubsub": "0.0.
|
|
40
|
-
"@teambit/react-router": "0.0.
|
|
38
|
+
"@teambit/preview": "0.0.852",
|
|
39
|
+
"@teambit/pubsub": "0.0.852",
|
|
40
|
+
"@teambit/react-router": "0.0.852",
|
|
41
41
|
"@teambit/ui-foundation.ui.is-browser": "0.0.492",
|
|
42
42
|
"@teambit/ui-foundation.ui.main-dropdown": "0.0.493",
|
|
43
43
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.496",
|
|
44
44
|
"@teambit/ui-foundation.ui.use-box.menu": "0.0.122",
|
|
45
|
-
"@teambit/ui": "0.0.
|
|
45
|
+
"@teambit/ui": "0.0.852",
|
|
46
46
|
"@teambit/component-issues": "0.0.72",
|
|
47
47
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.496",
|
|
48
48
|
"@teambit/cli-table": "0.0.40",
|
|
@@ -53,15 +53,15 @@
|
|
|
53
53
|
"@teambit/documenter.ui.heading": "4.1.1",
|
|
54
54
|
"@teambit/documenter.ui.separator": "4.1.1",
|
|
55
55
|
"@teambit/harmony.ui.aspect-box": "0.0.492",
|
|
56
|
-
"@teambit/
|
|
57
|
-
"@teambit/
|
|
58
|
-
"@teambit/
|
|
59
|
-
"@teambit/deprecation": "0.0.851",
|
|
60
|
-
"@teambit/envs": "0.0.851",
|
|
56
|
+
"@teambit/compositions": "0.0.852",
|
|
57
|
+
"@teambit/deprecation": "0.0.852",
|
|
58
|
+
"@teambit/envs": "0.0.852",
|
|
61
59
|
"@teambit/legacy-component-log": "0.0.398",
|
|
62
60
|
"@teambit/design.ui.styles.ellipsis": "0.0.353",
|
|
63
61
|
"@teambit/envs.ui.env-icon": "0.0.492",
|
|
64
62
|
"@teambit/explorer.ui.command-bar": "2.0.3",
|
|
63
|
+
"@teambit/design.ui.pages.not-found": "0.0.363",
|
|
64
|
+
"@teambit/design.ui.pages.server-error": "0.0.363",
|
|
65
65
|
"@teambit/base-ui.layout.breakpoints": "1.0.0",
|
|
66
66
|
"@teambit/component.ui.version-dropdown": "0.0.629",
|
|
67
67
|
"@teambit/lanes.ui.models": "0.0.25",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.852/dist/component.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.852/dist/component.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/ui/index.ts
CHANGED
|
@@ -2,6 +2,6 @@ export { Component } from './component';
|
|
|
2
2
|
export { ComponentModel, ComponentModelProps } from './component-model';
|
|
3
3
|
export { ComponentContext, ComponentProvider } from './context';
|
|
4
4
|
export { useComponent } from './use-component';
|
|
5
|
-
export { TopBarNav
|
|
5
|
+
export { TopBarNav } from './top-bar-nav';
|
|
6
6
|
export { componentIdFields, componentOverviewFields, componentFields } from './use-component-query';
|
|
7
7
|
export { useIdFromLocation } from './use-component-from-location';
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { useLocation } from 'react-router-dom';
|
|
4
|
-
import { Link
|
|
4
|
+
import { Link } from '@teambit/base-react.navigation.link';
|
|
5
|
+
import { NavPluginProps } from '../menu/nav-plugin';
|
|
5
6
|
|
|
6
7
|
import styles from './top-bar-nav.module.scss';
|
|
7
8
|
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
export function TopBarNav({ href, className, activeClassName, children, ...rest }: TopBarNavProps) {
|
|
9
|
+
export function TopBarNav({ href, className, activeClassName, children, displayName, ...rest }: NavPluginProps) {
|
|
11
10
|
const { search } = useLocation(); // sticky query params
|
|
12
11
|
|
|
12
|
+
// @hack - this is so that the displayName will not pass to the link and cause a warning in the console.
|
|
13
|
+
// it is used for component page nav link widgets (code, aspects etc),
|
|
14
|
+
// but not for regular menu links (overview, compositions, etc).
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16
|
+
const preventPassingDisplayNameToLink = displayName;
|
|
17
|
+
|
|
13
18
|
const target = `${href}${search}`;
|
|
14
19
|
|
|
15
20
|
return (
|
|
Binary file
|