Rename sidebarName to sidebarLabel

This commit is contained in:
Junghyun Colin Kim 2021-11-30 01:09:29 +09:00
parent bd41e3e18b
commit cbd182a74f
4 changed files with 9 additions and 9 deletions

View File

@ -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>

View File

@ -16,7 +16,7 @@ export interface IMenuItem {
id: string;
absoluteIdx?: number;
name: string;
sidebarName: string;
sidebarLabel: string;
description?: string;
depth: number;
active: boolean;

View File

@ -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 || '';

View File

@ -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.