Content.js 652 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * React Static Boilerplate
  3. * https://github.com/koistya/react-static-boilerplate
  4. *
  5. * Copyright © 2015-2016 Konstantin Tarkus (@koistya)
  6. *
  7. * This source code is licensed under the MIT license found in the
  8. * LICENSE.txt file in the root directory of this source tree.
  9. */
  10. import React from 'react';
  11. import Layout from '../layout/Layout.js';
  12. function Content({ title, html }) {
  13. return (
  14. <Layout>
  15. <h1>{title}</h1>
  16. <div dangerouslySetInnerHTML={{ __html: html }} />
  17. </Layout>
  18. );
  19. }
  20. Content.propTypes = {
  21. title: React.PropTypes.string.isRequired,
  22. html: React.PropTypes.string.isRequired,
  23. };
  24. export default Content;