build(aio): improve enum API rendering (#23872)

* The member details section is now called "Members", rather
than "Properties".
* The property table now displays appropriate table headings:
"Member", "Value", "Description".
* The "Value" column is not shown if none of the members have
a value.

Closes #22678

PR Close #23872
This commit is contained in:
Pete Bacon Darwin
2018-05-12 13:30:19 +01:00
committed by Alex Rickabaugh
parent a2e8b3a6a8
commit 02acb5e3e5
4 changed files with 50 additions and 4 deletions

View File

@ -0,0 +1,9 @@
module.exports = function hasValues() {
return {
name: 'hasValues',
process: function(list, property) {
if (!list || !Array.isArray(list)) return false;
return list.some(item => item[property]);
}
};
};