({ item, heading, children, headingLevel = 2 }: Props)
| 10 | } |
| 11 | |
| 12 | export function GraphqlItem({ item, heading, children, headingLevel = 2 }: Props) { |
| 13 | const lowerCaseName = item.name.toLowerCase() |
| 14 | return ( |
| 15 | <div> |
| 16 | {headingLevel === 2 && ( |
| 17 | <h2 id={lowerCaseName}> |
| 18 | <LinkIconHeading slug={lowerCaseName} /> |
| 19 | {item.name} |
| 20 | </h2> |
| 21 | )} |
| 22 | {headingLevel === 3 && ( |
| 23 | <h3 id={lowerCaseName}> |
| 24 | <LinkIconHeading slug={lowerCaseName} /> |
| 25 | {item.name} |
| 26 | </h3> |
| 27 | )} |
| 28 | <div |
| 29 | dangerouslySetInnerHTML={{ |
| 30 | __html: item.description, |
| 31 | }} |
| 32 | /> |
| 33 | <div> |
| 34 | {item.preview && <Notice item={item} variant="preview" />} |
| 35 | {item.isDeprecated && <Notice item={item} variant="deprecation" />} |
| 36 | </div> |
| 37 | <div> |
| 38 | {heading && <h4>{heading}</h4>} |
| 39 | {children} |
| 40 | </div> |
| 41 | </div> |
| 42 | ) |
| 43 | } |
nothing calls this directly
no outgoing calls
no test coverage detected