Background
The generated props data for components sometimes lists a prop type of a TypeScript type name, without any information about what that type is. The same goes for constants, e.g. when they're used as the default value of a prop. We need to provide users a way to see this information on the demo site (or, at least, link to the proper place in the code); otherwise they must either have type hinting set up in their IDE (which may only be possible within a TypeScript project) or look at the Codex code to see what the type means.
For example, this is what the menuItems prop for the Lookup component looks like on the docs site:
The reader will have no way of accessing information about the MenuItemData type from here.
Potential solutions
Ideally, we would automate one of the following:
- Turn types into a link that goes to either an individual page on the docs site about that type, or a single page that lists all the types (and one for constants)
- Display the type definition on the demo page somehow (print it out below the type name, show it on hover, etc)
A quicker but less elegant solution would be to link to the types or constants file on gtiles or something from the usage docs if a constant or TypeScript type is used.
Acceptance criteria
- Design a way to provide type and constant definitions to the user from demo pages
- Implement it