mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-06 05:10:20 +03:00
Rename sidebarName to sidebarLabel
This commit is contained in:
parent
bd41e3e18b
commit
cbd182a74f
|
@ -45,8 +45,8 @@ export class MenuItem extends React.Component<MenuItemProps> {
|
|||
<OperationMenuItemContent {...this.props} item={item as OperationModel} />
|
||||
) : (
|
||||
<MenuItemLabel depth={item.depth} active={item.active} type={item.type} ref={this.ref}>
|
||||
<MenuItemTitle title={item.sidebarName}>
|
||||
{item.sidebarName}
|
||||
<MenuItemTitle title={item.sidebarLabel}>
|
||||
{item.sidebarLabel}
|
||||
{this.props.children}
|
||||
</MenuItemTitle>
|
||||
{(item.depth > 0 && item.items.length > 0 && (
|
||||
|
@ -96,7 +96,7 @@ export class OperationMenuItemContent extends React.Component<OperationMenuItemC
|
|||
<OperationBadge type={item.httpVerb}>{shortenHTTPVerb(item.httpVerb)}</OperationBadge>
|
||||
)}
|
||||
<MenuItemTitle width="calc(100% - 38px)">
|
||||
{item.sidebarName}
|
||||
{item.sidebarLabel}
|
||||
{this.props.children}
|
||||
</MenuItemTitle>
|
||||
</MenuItemLabel>
|
||||
|
|
|
@ -16,7 +16,7 @@ export interface IMenuItem {
|
|||
id: string;
|
||||
absoluteIdx?: number;
|
||||
name: string;
|
||||
sidebarName: string;
|
||||
sidebarLabel: string;
|
||||
description?: string;
|
||||
depth: number;
|
||||
active: boolean;
|
||||
|
|
|
@ -14,7 +14,7 @@ export class GroupModel implements IMenuItem {
|
|||
id: string;
|
||||
absoluteIdx?: number;
|
||||
name: string;
|
||||
sidebarName: string;
|
||||
sidebarLabel: string;
|
||||
description?: string;
|
||||
type: MenuItemGroupType;
|
||||
|
||||
|
@ -44,7 +44,7 @@ export class GroupModel implements IMenuItem {
|
|||
this.name = tagOrGroup['x-displayName'] || tagOrGroup.name;
|
||||
this.level = (tagOrGroup as MarkdownHeading).level || 1;
|
||||
|
||||
this.sidebarName = this.name;
|
||||
this.sidebarLabel = this.name;
|
||||
|
||||
// remove sections from markdown, same as in ApiInfo
|
||||
this.description = tagOrGroup.description || '';
|
||||
|
|
|
@ -49,7 +49,7 @@ export class OperationModel implements IMenuItem {
|
|||
id: string;
|
||||
absoluteIdx?: number;
|
||||
name: string;
|
||||
sidebarName: string;
|
||||
sidebarLabel: string;
|
||||
description?: string;
|
||||
type = 'operation' as const;
|
||||
|
||||
|
@ -105,8 +105,8 @@ export class OperationModel implements IMenuItem {
|
|||
|
||||
this.name = getOperationSummary(operationSpec);
|
||||
|
||||
this.sidebarName = this.name;
|
||||
if (options.sideNavStyle === 'path-only') this.sidebarName = this.path;
|
||||
this.sidebarLabel = this.name;
|
||||
if (options.sideNavStyle === 'path-only') this.sidebarLabel = this.path;
|
||||
|
||||
if (this.isCallback) {
|
||||
// NOTE: Callbacks by default should not inherit the specification's global `security` definition.
|
||||
|
|
Loading…
Reference in New Issue
Block a user