import { useXMLViewerContext } from '../../context/xml-viewer-context'; import { AttributesObject } from '../../types'; export interface AttributesProps { attributes?: AttributesObject; } export function Attributes(props: AttributesProps) { const { attributes } = props; const { theme } = useXMLViewerContext(); if (!attributes) { return null; } return ( {Object.entries(attributes).map(([key, value]) => ( {` ${key}`} = {`"${value}"`} ))} ); }