import React, { ReactNode } from 'react'; export type CapLevel = 'yes' | 'config' | 'na' | 'no'; const labels: Record = { yes: 'Supported', config: 'Supported with configuration', na: 'Not applicable', no: 'Not available', }; export const Cap = ({level}: {level: CapLevel}) => ( ); export const CapabilityLegend = ({children}: {children?: ReactNode}) => (
    {(Object.keys(labels) as CapLevel[]).map(l =>
  • {labels[l]}
  • )}
{children !== undefined ?
What do these mean? {children}
: null}
);