Added Title component for the layout

This commit is contained in:
Jori Lallo
2016-05-15 16:44:17 -05:00
parent 25af2e9152
commit 2006a64e24
8 changed files with 74 additions and 27 deletions

View File

@@ -10,7 +10,7 @@ import {
import styles from './Editor.scss';
import 'assets/styles/codemirror.css';
import Layout from 'components/Layout';
import Layout, { Title } from 'components/Layout';
import Flex from 'components/Flex';
import MarkdownEditor from 'components/MarkdownEditor';
@@ -26,6 +26,15 @@ class Editor extends Component {
}
render() {
let title = (
<Title
truncate={ 60 }
placeholder={ "Untitle document" }
>
{ this.props.title }
</Title>
);
return (
<Layout
actions={(
@@ -34,15 +43,13 @@ class Editor extends Component {
<MoreAction />
</Flex>
)}
title={ this.props.title }
title={ title }
>
<MarkdownEditor
onChange={ this.props.updateText }
text={ this.props.text }
replaceText={this.props.replaceText}
/>
<MarkdownEditor
onChange={ this.props.updateText }
text={ this.props.text }
replaceText={this.props.replaceText}
/>
</Layout>
);
}