(props: EntryProps)
| 11 | } |
| 12 | |
| 13 | export const Entry = (props: EntryProps) => { |
| 14 | const { entry, startDrag } = props |
| 15 | return ( |
| 16 | <> |
| 17 | <Text py={3} pl={0} pr={1} className={'tray-entry-abstract'}> |
| 18 | {entry.abstract} |
| 19 | </Text> |
| 20 | {!entry.examples || entry.examples?.length === 0 ? null : ( |
| 21 | <Text |
| 22 | className="tray-entry-example-label" |
| 23 | pt={3} |
| 24 | pb={2} |
| 25 | pl={0} |
| 26 | pr={1} |
| 27 | borderTop={'1px solid'} |
| 28 | borderColor={'gray.500'} |
| 29 | > |
| 30 | Examples: |
| 31 | </Text> |
| 32 | )} |
| 33 | {entry.examples?.map((example, idx) => { |
| 34 | const fragment = new RenderedFragment(deserializeFragment(example.serializedNodes), true) |
| 35 | return ( |
| 36 | <Box key={idx} py={2}> |
| 37 | <MicroNode fragment={fragment} startDrag={startDrag} /> |
| 38 | <Text textColor={'gray.400'} lineHeight={1.1} pt={1} pb={2} pl={0} pr={1}> |
| 39 | {example.description} |
| 40 | </Text> |
| 41 | </Box> |
| 42 | ) |
| 43 | })} |
| 44 | </> |
| 45 | ) |
| 46 | } |
nothing calls this directly
no test coverage detected