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.
The generated props table on the NavButton documentation page lists only
children,prefixIcon,suffixIconandvariant. It omitssize,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
onClickandaria-*are forwarded, finds nothing and has to read thesource.
Why
Both documented variants keep those fields behind the alias
NavButtonBaseProps, which is notexported:
The docs generator follows a first-page reference only when TypeDoc gives it a numeric target.
For this alias it does not, so
collectPropsandfindNativeElementstop at the alias andreport what remains.
What would resolve it
Either make the shared fields resolvable for the generator, or teach
collectPropsandfindNativeElementto expand the alias. Whichever route, a generation assertion should coversize,isSelected,tooltipandnativeElement === 'button', so the table cannot silentlylose 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.