insomnia/app/components/ResponseHeadersViewer.js

21 lines
455 B
JavaScript
Raw Normal View History

import React, {PropTypes} from 'react';
import CopyButton from './base/CopyButton';
const ResponseHeadersViewer = ({headers}) => {
const headersString = headers.map(
h => `${h.name}: ${h.value}`
).join('\n');
return (
2016-07-27 17:25:03 +00:00
<pre className="scrollable wide tall selectable monospace pad">
{headersString}
</pre>
)
};
ResponseHeadersViewer.propTypes = {
headers: PropTypes.array.isRequired
};
export default ResponseHeadersViewer;