sebdet | c95e8df | 2019-06-25 11:06:06 +0200 | [diff] [blame^] | 1 | import React from 'react'; |
| 2 | import ReactDOM from 'react-dom'; |
| 3 | import './index.css'; |
| 4 | |
| 5 | class UserBar extends React.Component { |
| 6 | render () { |
| 7 | const user = this.props.user; |
| 8 | return ( |
| 9 | <div className="user_name">Hello:{user} |
| 10 | </div> |
| 11 | ); |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | class ClampLogo extends React.Component { |
| 16 | render() { |
| 17 | return ( |
| 18 | <div className="col-md-4 col-lg-4"> |
| 19 | <img className="image_style" alt="" src={require('./images/logo_onap_2017.png')} |
| 20 | height="50px" |
| 21 | width="234px"/> |
| 22 | <div className="navbar-brand logo"> |
| 23 | |
| 24 | <b>CLAMP</b> |
| 25 | </div> |
| 26 | </div> |
| 27 | ); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | class ClampHeader extends React.Component { |
| 32 | render() { |
| 33 | return ( |
| 34 | <div className='rowC'> |
| 35 | <ClampLogo /> |
| 36 | <div className="dummy"></div> |
| 37 | <UserBar /> |
| 38 | </div> |
| 39 | ); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | ReactDOM.render( |
| 44 | <ClampHeader />, |
| 45 | document.getElementById('root') |
| 46 | ) |