import React from 'react'; type Props = { path: string; lineNumber?: null | number; }; export default function RelaxedFullyQualifiedClassName({ path, lineNumber = null }: Props) { const parts = path.split('\\'); const tightSpace = String.fromCharCode(8201); return ( {parts.map((part, index) => ( {part} {index !== parts.length - 1 && {tightSpace}\{tightSpace} } ))} {lineNumber && <> {tightSpace} :{tightSpace} {lineNumber} } ); }