docs/src/modules/utils/generateMarkdown.ts/generateProps
function generateProps(reactAPI: ReactApi) {
  const header = '## Props';

  let text = `${header}

| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|\n`;

  Object.keys(reactAPI.props).forEach((propName) => {
    const propDescriptor = reactAPI.props[propName];
    if (propName === 'classes') {
      propDescriptor.description += ' See [CSS API](#css) below for more details.';
    }

    const prop = createDescribeableProp(propDescriptor, propName);
    if (prop === null) {
      return;
    }

    const description = generatePropDescription(prop, propName);

    let defaultValueColumn = '';
    // give up on "large" default values e.g. big functions or objects
    if (prop.defaultValue) {
      defaultValueColumn = `<span class="prop-default">${escapeCell(prop.defaultValue!)}</span>`;
    }

    const chainedPropType = getChained(prop.type);

    let propNameColumn = propName;
    if (
      prop.required ||
      /\.isRequired/.test(prop.type.raw) ||
      (chainedPropType !== false && chainedPropType.required)
    ) {
      propNameColumn = `<span class="prop-name required">${propName}<abbr title="required">*</abbr></span>`;
    } else {
      propNameColumn = `<span class="prop-name">${propName}</span>`;
    }

    if (prop.type.name === 'custom') {
      if (getDeprecatedInfo(prop.type)) {
        propNameColumn = `~~${propNameColumn}~~`;
      }
    }

    text += `| ${propNameColumn} | <span class="prop-type">${generatePropType(
      prop.type,
    )}</span> | ${defaultValueColumn} | ${description} |\n`;
  });

  let refHint = 'The `ref` is forwarded to the root element.';
  if (reactAPI.forwardsRefTo == null) {
    refHint = 'The component cannot hold a ref.';
  } else if (reactAPI.forwardsRefTo === 'React.Component') {
    refHint = 'The `ref` is attached to a component class.';
  } else if (reactAPI.forwardsRefTo === 'Object') {
    refHint = `The \`ref\` is attached to an Imperative Handle. Have a look at the [implementation of the component](${SOURCE_CODE_ROOT_URL}${normalizePath(
      reactAPI.filename,
    )}) for more detail.`;
  }
  text = `${text}\n${refHint}\n`;

  if (reactAPI.spread) {
    text = `${text}
Any other props supplied will be provided to the root element (${
      reactAPI.inheritance
        ? `[${reactAPI.inheritance.component}](${reactAPI.inheritance.pathname})`
        : 'native element'
    }).`;
  }

  return text;
}