({links, type})
| 17 | import typographyStyles from '@adobe/spectrum-css-temp/components/typography/vars.css'; |
| 18 | |
| 19 | export function TypeLink({links, type}) { |
| 20 | let registered = useContext(LinkContext); |
| 21 | registered.set(type.id, {type, links}); |
| 22 | |
| 23 | let used = getUsedLinks(type, links); |
| 24 | for (let id in used) { |
| 25 | registered.set(id, {type: used[id], links}); |
| 26 | } |
| 27 | |
| 28 | return ( |
| 29 | <TypeContext.Provider value={links}> |
| 30 | <code className={`${typographyStyles['spectrum-Code4']}`}> |
| 31 | <a |
| 32 | href={'#' + type.id} |
| 33 | data-link={type.id} |
| 34 | className={`${styles.colorLink} token hljs-name`} |
| 35 | data-hover={styles['is-hovered']}> |
| 36 | {type.name} |
| 37 | </a> |
| 38 | </code> |
| 39 | </TypeContext.Provider> |
| 40 | ); |
| 41 | } |
nothing calls this directly
no test coverage detected