ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

Page.js (926B)


      1 /**
      2  * React Starter Kit (https://www.reactstarterkit.com/)
      3  *
      4  * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
      5  *
      6  * This source code is licensed under the MIT license found in the
      7  * LICENSE.txt file in the root directory of this source tree.
      8  */
      9 
     10 import React, { PropTypes } from 'react';
     11 import withStyles from 'isomorphic-style-loader/lib/withStyles';
     12 import s from './Page.css';
     13 
     14 class Page extends React.Component {
     15   static propTypes = {
     16     title: PropTypes.string.isRequired,
     17     html: PropTypes.string.isRequired,
     18   };
     19 
     20   render() {
     21     const { title, html } = this.props;
     22     return (
     23       <div className={s.root}>
     24         <div className={s.container}>
     25           <h1>{title}</h1>
     26           <div
     27             // eslint-disable-next-line react/no-danger
     28             dangerouslySetInnerHTML={{ __html: html }}
     29           />
     30         </div>
     31       </div>
     32     );
     33   }
     34 }
     35 
     36 export default withStyles(s)(Page);