function getComponentType()

in doc/src/theme/NavbarItem/index.tsx [44:51]


function getComponentType(type: Types, isDropdown: boolean): NavbarItemComponentType {
  // Backward compatibility: navbar item with no type set
  // but containing dropdown items should use the type "dropdown"
  if (!type || type === 'default') {
    return isDropdown ? 'dropdown' : 'default';
  }
  return type as NavbarItemComponentType;
}