Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react';
- class Note extends Component {
- constructor(props) {
- super(props)
- }
- render() {
- console.log(this.props.note);
- const divStyle = {
- flex:1,
- alignSelf:'flex-start',
- margin: ' 0 10px',
- minWidth: '400px',
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent:'center',
- }
- const hStyle = {
- alignSelf: 'center',
- }
- const pStyle = {
- textIndent: '20px',
- }
- if(!this.note) {
- return (<div style={divStyle}> Note Doesnt exist </div>);
- }
- return(
- <div style={divStyle}>
- <h2 style={hStyle}>{ this.props.note }</h2>
- <p style={pStyle}>{ this.props.note }</p>
- </div>
- );
- }
- }
- export default Note ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement