Update models.js [ci skip]

This commit is contained in:
Ines Montani 2019-09-30 12:01:09 +02:00
parent 9cbaf9b965
commit 71bd040834

View File

@ -239,7 +239,7 @@ const Model = ({ name, langId, langName, baseUrl, repo, compatibility, hasExampl
)} )}
</tbody> </tbody>
</Table> </Table>
<Grid cols={2} gutterBottom={hasInteractiveCode || labels}> <Grid cols={2} gutterBottom={hasInteractiveCode || !!labels}>
{accuracy && {accuracy &&
accuracy.map(({ label, items }, i) => accuracy.map(({ label, items }, i) =>
!items ? null : ( !items ? null : (
@ -293,29 +293,31 @@ const Model = ({ name, langId, langName, baseUrl, repo, compatibility, hasExampl
. .
</p> </p>
<Table fixed> <Table fixed>
{Object.keys(labels).map(pipe => { <tbody>
const labelNames = labels[pipe] || [] {Object.keys(labels).map(pipe => {
const help = LABEL_SCHEME_META[pipe] const labelNames = labels[pipe] || []
return ( const help = LABEL_SCHEME_META[pipe]
<Tr key={pipe} evenodd={false}> return (
<Td style={{ width: '20%' }}> <Tr key={pipe} evenodd={false} key={pipe}>
<Label> <Td style={{ width: '20%' }}>
{pipe} {help && <Help>{help}</Help>} <Label>
</Label> {pipe} {help && <Help>{help}</Help>}
</Td> </Label>
<Td> </Td>
{labelNames.map((label, i) => ( <Td>
<> {labelNames.map((label, i) => (
{i > 0 && ', '} <>
<InlineCode wrap key={label}> {i > 0 && ', '}
{label} <InlineCode wrap key={label}>
</InlineCode> {label}
</> </InlineCode>
))} </>
</Td> ))}
</Tr> </Td>
) </Tr>
})} )
})}
</tbody>
</Table> </Table>
</Accordion> </Accordion>
)} )}