Fixes #137 - vertical alignment
This commit is contained in:
@ -154,32 +154,34 @@ type Props = {
|
|||||||
onDrop={this.handleDrop}
|
onDrop={this.handleDrop}
|
||||||
onDragOver={this.cancelEvent}
|
onDragOver={this.cancelEvent}
|
||||||
onDragEnter={this.cancelEvent}
|
onDragEnter={this.cancelEvent}
|
||||||
|
align="flex-start"
|
||||||
|
justify="center"
|
||||||
auto
|
auto
|
||||||
column
|
|
||||||
align="center"
|
|
||||||
>
|
>
|
||||||
<HeaderContainer
|
<MaxWidth column auto>
|
||||||
onClick={this.focusAtStart}
|
<HeaderContainer
|
||||||
readOnly={this.props.readOnly}
|
onClick={this.focusAtStart}
|
||||||
>
|
readOnly={this.props.readOnly}
|
||||||
{this.props.heading}
|
>
|
||||||
</HeaderContainer>
|
{this.props.heading}
|
||||||
<Toolbar state={this.state.state} onChange={this.onChange} />
|
</HeaderContainer>
|
||||||
<Editor
|
<Toolbar state={this.state.state} onChange={this.onChange} />
|
||||||
key={this.props.starred}
|
<Editor
|
||||||
ref={ref => (this.editor = ref)}
|
key={this.props.starred}
|
||||||
placeholder="Start with a title..."
|
ref={ref => (this.editor = ref)}
|
||||||
className={cx(styles.editor, { readOnly: this.props.readOnly })}
|
placeholder="Start with a title..."
|
||||||
schema={this.schema}
|
className={cx(styles.editor, { readOnly: this.props.readOnly })}
|
||||||
plugins={this.plugins}
|
schema={this.schema}
|
||||||
state={this.state.state}
|
plugins={this.plugins}
|
||||||
onChange={this.onChange}
|
state={this.state.state}
|
||||||
onDocumentChange={this.onDocumentChange}
|
onChange={this.onChange}
|
||||||
onSave={this.props.onSave}
|
onDocumentChange={this.onDocumentChange}
|
||||||
readOnly={this.props.readOnly}
|
onSave={this.props.onSave}
|
||||||
/>
|
readOnly={this.props.readOnly}
|
||||||
{!this.props.readOnly &&
|
/>
|
||||||
<ClickablePadding onClick={this.focusAtEnd} grow />}
|
{!this.props.readOnly &&
|
||||||
|
<ClickablePadding onClick={this.focusAtEnd} grow />}
|
||||||
|
</MaxWidth>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -189,6 +191,11 @@ MarkdownEditor.childContextTypes = {
|
|||||||
starred: PropTypes.bool,
|
starred: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const MaxWidth = styled(Flex)`
|
||||||
|
max-width: 50em;
|
||||||
|
height: 100%;
|
||||||
|
`;
|
||||||
|
|
||||||
const HeaderContainer = styled(Flex).attrs({
|
const HeaderContainer = styled(Flex).attrs({
|
||||||
align: 'flex-end',
|
align: 'flex-end',
|
||||||
})`
|
})`
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
padding: 0 3em;
|
width: 100%;
|
||||||
width: 50em;
|
|
||||||
color: #1b2631;
|
color: #1b2631;
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
|
Reference in New Issue
Block a user