Skip to content

NavButton props table omits size, isSelected, tooltip and the native element #108

Description

@librowski

The generated props table on the NavButton documentation page lists only children,
prefixIcon, suffixIcon and variant. It omits size, isSelected, the tooltip fields,
and every forwarded native button attribute, and it does not report the underlying native
element.

So the page hides the component's main state and size controls. A reader looking for how to
set a size, or whether onClick and aria-* are forwarded, finds nothing and has to read the
source.

Why

Both documented variants keep those fields behind the alias NavButtonBaseProps, which is not
exported:

// packages/ui/src/components/button/nav-button/types.ts
type NavButtonBaseProps = Omit<BaseButtonProps, 'children'> & {
  /** @default 'm' */
  size?: NavButtonSize;
  isSelected?: boolean;
};

The docs generator follows a first-page reference only when TypeDoc gives it a numeric target.
For this alias it does not, so collectProps and findNativeElement stop at the alias and
report what remains.

What would resolve it

Either make the shared fields resolvable for the generator, or teach collectProps and
findNativeElement to expand the alias. Whichever route, a generation assertion should cover
size, isSelected, tooltip and nativeElement === 'button', so the table cannot silently
lose them again.

Context

Found in the second review round of the DS 2.0 stack, on the NavButton rebuild (#92). The
maintainer chose to file it rather than fix it inside that PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions